02-24-2016, 04:25 PM
Macro UserPasswordCommandLine
Command line to run the macro in QM:
qmcl.exe M "UserPasswordCommandLine" C /u aaaaaaaa /p bbbbbbb
Command line to run the macro converted to exe:
c:\test\UserPasswordCommandLine.exe /u aaaaaaaa /p bbbbbbb
;Command line format:
;/u username /p password
str s=_command
;out s
ARRAY(str) a; int i
ExeParseCommandLine s a
str username password
for i 0 a.len
,;out a[i]
,sel a[i] 2
,,case ["/*","-*"]
,,sel a[i]+1
,,,case "u" i+1; username=a[i]; err
,,,case "p" i+1; password=a[i]; err
if(!username.len) end "no username"
if(!password.len) end "no password"
out username
out password
Command line to run the macro in QM:
qmcl.exe M "UserPasswordCommandLine" C /u aaaaaaaa /p bbbbbbb
Command line to run the macro converted to exe:
c:\test\UserPasswordCommandLine.exe /u aaaaaaaa /p bbbbbbb