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

I am totally new to QM and I have a question please:

How to use such macro function code from above post as a program function?



I don't get it. Even the help file didn't help me.


My example code would look like this:


test-commandline
Code:
Copy      Help
;/exe

Function ParseCommandLine
/
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])

LocalFree w






ARRAY(str) a
ParseCommandLine(cl a)

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



test-commandline2
Code:
Copy      Help
run "$my qm$\test-commandline.exe" "/a /b /c"



- - -

EDIT

I read now quickmacros.com/forum/viewtopic.php?p=3524

2. In QM, create new function. To create new function, click menu File -> New -> New Function.


Question:

Do I really have to do this and utilize a second "document"?

Can't I just copy that function together with my code?

Now, if I will use "File -> New -> New Function", and if I compile to exe, would every needed functions be collect automatically and pack to the exe too?


Thanks Big Grin


Messages In This Thread

Forum Jump:


Users browsing this thread: 2 Guest(s)