Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
passing a variable to qm
#1
well, i told this before ... i use qm with powerpro as a tandem.
my problem is that i want to pass an url as command to qm.

from powerpro its:

$(q) M "paster" "$(img)"

where $(q) is the qm exe path and $(img) an image url which i gonna paste into some web application.

the problem i face is escaping the command, because the img str is:

Code:
Copy      Help
<img src="http://www.flash2be.com/xpi/pic/screenshots/ppro00.gif" alt="ppro00.gif" border="0">

qm code for macro paster:
Code:
Copy      Help
str s=command
out s


qm is returning only img src, after that it thinks it is a new command ?

i can send single quotes instead and maybe replace them in qm with double quotes.

but is there maybe an easier way to pass a variable or command to qm ?

my reason to use both programs is that powerpro offers cool menus and i am also deep in their syntax.

you can see and read about my crazy stuff on:
http://www.flash2be.com/xpi
thanks
pi[/url]
pi
#2
Following info applies to QM 2.0.9, 03/29/2003.

Now in QM command line you can use C, followed by single space and command:

$(q) M "paster" C $(img)

Command here is not enclosed into quotes. It itself can contain quotes.
#3
thank you !
pi
#4
what about :
$(q) M "paster" C1 $(img) C2 $(var) C3 something else

so that i can pass more variables to qm.

an another way would be that i use some letter as seperator and split
the string in qm ...
pi
#5
Good suggestion. Outcome is that now functions and macros started by command line can receive arguments. Example (pass 3 arguments: string, integer and double):

in PP:

Code:
Copy      Help
... M "macro" A "some string" 1 1.5
or
Code:
Copy      Help
... M "macro" A(SEP) some stringSEP1SEP1.5


in QM:

Code:
Copy      Help
function $s i ^d
...
#6
thats pretty cool and works very fine.
it took me a small time to understand your example,
because i idiot included the M in my pp variable qm :roll:

so for ppro users my command looks like that :

initialize the qm path as variable at ppro start :
Code:
Copy      Help
qm = "'"C:\Programme\PowerPro\Quick Macros 2\qmcl.exe'" M"]
(M is included ...)

Code:
Copy      Help
$(qm) "tester" A "first string" 1 "second string"

to get the third variable (second string string) the qm code for tester is :
Code:
Copy      Help
function $string1 i $string2
mes m
pi
#7
http://www.flash2be.com/xpi/archives/powerpro_qm.php
pi


Forum Jump:


Users browsing this thread: 1 Guest(s)