PuzzledGreatly wrote:Within a function parameters can't be variables
I assume what you mean is that you cannot use parameters as GUI
variables. That is because parameters are non-static local variables. You cannot use non-static local variables as GUI variables.
how to create a GUI variable inside a function without declaring the variable as global or static in advance?
If the variable already exists as a static or global variable and not
as a non-static local variable, you can just pass vvariablename
to the Gui command without prior declaration. Otherwise, you must either explicitly declare the variable or make the function assume-global or assume-static.
Is there anyway to pass a variable name into a function?
Yes, the same ways that you pass any other string into a function...