09-07-2017, 04:46 AM
In scripts of type macro and function you can use simple variables.
In scripts of type menu, toolbar and autotext there is no way to use simple variables common to all items. But can use global variables or environment variables. These must be set (once) in a function that runs before. I recommend to set them in function named "init2". It runs automatically at startup.
Function init2
Menu Menu59
In scripts of type menu, toolbar and autotext there is no way to use simple variables common to all items. But can use global variables or environment variables. These must be set (once) in a function that runs before. I recommend to set them in function named "init2". It runs automatically at startup.
Function init2
;global variables
str+ g_PROGRAM="C:\Users\username\AppData\Local\SomeProgram\Program.exe"
str+ g_SRLP1="SomeReallyLongParameter1"
;environment variables (supported only by some functions, at the start of file path strings)
SetEnvVar "DIR1" "C:\Users\username\AppData\Local\SomeProgram"
SetEnvVar "DIR2" "C:\Users\username\AppData\Local\OtherProgram"
Menu Menu59