Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Command Line Parameters on an EXE
#12
Hi Gintaras and all QM fellows!

Two questions, please:

1- Why the delay exe vs function?

2- How to pass parameters from a QM exe to a QM function?

Regards.

Macro Macro412
Code:
Copy      Help
out

long t1 t2 t3

t1=perf
run "$my qm$\Macro414.exe" "a b c"
t2=perf

Function18 "a b c"
t3=perf

out F"{(t2-t1)} microsec"
out F"{(t3-t2)} microsec"
out F"{(t2-t1)/(t3-t2)} times faster"

;148068 microsec
;47 microsec
;3150 times faster

Function Function18
Code:
Copy      Help
function str's

ARRAY(str) a
tok(s a)

int i
for i 0 a.len
,out a[i]

Macro Macro414 <- This is my exe
Code:
Copy      Help
ARRAY(str) a
ExeParseCommandLine(_command a)

int i
for i 0 a.len
,out a[i]

;BEGIN PROJECT
;main_function  Macro414
;exe_file  $my qm$\Macro414.exe
;icon  <default>
;manifest  $qm$\default.exe.manifest
;flags  6
;guid  {57C55193-8C16-4D76-A298-F6D3488E66DE}
;END PROJECT


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)