Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Command Line Parameters on an EXE
#10
Thanks.

Of course, after posting I get how it works:


Function "document": ParseCommandLine
Code:
Copy      Help
/
function $cmdLine ARRAY(str)&a

a=0
if(empty(cmdLine)) ret
int i n
word** w=CommandLineToArgvW(@cmdLine &n)
for(i 0 n) a[].ansi(w[i])

Macro-1: (my program code, utilizing the above function. And "_command" will get me access to the command line parameters)
Code:
Copy      Help
;/exe

ARRAY(str) a
ParseCommandLine(_command a)

int i
for i 0 a.len
    mes a[i]

Macro-2: (my example program to try out Macro-1)
Code:
Copy      Help
run "$my qm$\Macro-1.exe" "/a /b /c"


Many thanks.
Now I understand a little bit more :mrgreen:
Now I go trying your other suggestions.


Messages In This Thread

Forum Jump:


Users browsing this thread: 3 Guest(s)