Hello,
The observations that both of you are making make good sense. As I said, the Zabaware CustomMem routine allows you to combine any number of variables into CustomMem, pass it out of the script and back into the script, and then retrieve all the pieces. This would accomplish the same thing as a one-dimensional array, but of course it would not do the same thing as a two-dimensional array.
One thing that you should experiment with for your own satisfaction, is to declare a variant just BEFORE the first function begins in the script like so:
Dim MyVariant001
What this does, is to make it a variant with "script-level scope," which means that it is available to any and all functions in the script, PLUS it is retained in the computer's RAM in between exchanges! This is described at the top of page 62 in the book "VBS in a Nutshell." I have tested this and it does work!
I understand that the reasons Zabaware doesn't use "script level variants" are as follows:
1) They intend to have some convergence down the road between the engines of the UltraHal Assistant product and the UltraHal Representative product. There was at one time a possible concern that "script level scope" might cause some problems with the way that the web-server product must operate.
2) Many of the variants must be passed to routines outside of the script anyway.
For home experimenters, however,I don't see that having a few variants with "script-level scope" would hurt anything. I suggest testing out "script-level scope" and see how it works for you.
Here is a quotation from page 62 of "VBS in a Nutshell" on this topic:
"If you program in Visual Basic, you'll probably recognize that script-level scope is really the VBScript equivalent of Visual Basic's global variables.
"A variable has script-level scope when it can be accessed by all the subroutines and functions contained in a particular script. Variables and constants that have script-level scope also reside in memory for the lifetime of the script. That is to say, as long as the script remains in memory, its script-level variables and constants also remain in memory. To create a variable with script-level scope, you must declare it outside of any subroutine or function."
I appreciate what you're doing very much and I wish you much success! Have fun!
Sincerely,
Don