Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Executing Long Commands
#2
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
Code:
Copy      Help
;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
Code:
Copy      Help
MY_PROGRAM :run g_PROGRAM g_SRLP1
MY_PROGRAM 2 :run "%DIR1%\Program.exe"


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)