I run my Macro Creator PMC scripts from Windows Scheduler or command prompt like below:
"C:\Program Files\MacroCreator\MacroCreator.exe" "my.pmc" -s1
I like to pass some arguments like
"C:\Program Files\MacroCreator\MacroCreator.exe" "my.pmc" -s1 arg1 arg2
and then access the arguments in the script. I know it is possible to do so from AHK script (see https://superuser.com/questions/1401680/how-to-pass-command-line-arguments-to-ahk-script). I would like to know how to do the same from a PMC script.
How to pass command-line arguments to PMC script?
Moderator: Pulover
Re: How to pass command-line arguments to PMC script?
You can find all arguments on the A_Args array https://www.autohotkey.com/docs/Variables.htm#Args
c:\Program Files\MacroCreator\MacroCreator.exe "file.pmc" -a customArgument
Code: Select all
[PMC Globals]|None||
[PMC Code v5.4.1]|F12||1|Window,RegEx,Fast,1,1,Input,-1,-1,1|1|Macro1
Context=None|
Groups=Start:1
1|[MsgBox]|% A_Args[1] "`n" A_Args[2] "`n" A_Args[3]|1|0|MsgBox|0||||1|
Rodolfo U. Batista
Pulover's Macro Creator - Automation Tool (Recorder & Script Writer)
Pulover's Macro Creator - Automation Tool (Recorder & Script Writer)