Quantcast
Channel: AutoIt v3 - General Help and Support
Viewing all articles
Browse latest Browse all 12506

Dynamically create Globals

$
0
0

I have an application where I dynamically create variables based on key/values read from a downloaded INI file. The keyname becomes the variable name and the key value becomes the variable value. I use the "Assign" command to do this. This works fine except that the variable name must be pre-defined in a "Global" statement at the beginning of the program. This means that every variable I "might create" from the file INI must be predefined in the Autoit script. If I want to create new variables based on the data in INI file, I have to recompile the program to set the Global statements.

 

Is there some way to dynamically declare global variables without having to recompile the program?? For example, could I read a list of variable names from a file (or an INI section) and define them globally before I actually start processing the rest of the INI file??

 

Thanks.


Viewing all articles
Browse latest Browse all 12506

Trending Articles