Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Help to Receive shortcut param in a qm created exe
Need help to receive shortcut param in a qm created exe.

Eg. I created an .exe with QM.
This program first thing, needs to check for the shortcuts params. The program does not know the path to the shortcut.
For example.. How does QM handle the "v"?
Desktop shortcut for QM:
"C:\Program Files (x86)\Quick Macros 2\qm.exe" v <---

1) Multiple shortcuts pointing to same program.
Some will have no arguments, and some will.

2) Shortcut target is:
C:\UT\OC\O_C.exe -sc <-- ;; this is what O_C.exe will look for.

Code below: sorry could not get code for forum to go correctly...
<<< STRINGS >>>
str s1
str sIni
str sRunPath;; ie. "C:\UT"
str sWinName;; ie. "UT"


GetShortcutInfoEx(s1 si);; s1=Path to Shortcut si=Args
out si.initdir
out si.param;; ie. "-sc" look for this in O_C.exe program first thing!
if si.param="-sc"
goto Process:
goto GetPath:

Any help, many thanks.
Look in qm category.


Example in ExeParseCommandLine help.
Not sure what is meant by qm category.
Do you mean by typing _command and using a global str to pass argument?
Sorry Gintaras, I'm just getting back into this. I am a little rusty..
Type category name, dot, and look for a function in the list. More info about categories - in QM Help.
Also you can find the answer in QM Help topic "Make exe", chapter "Command line arguments".
Ok Gintaras, you mean this...

Command line arguments
If the program is launched with command line arguments, it is in a special variable _command. To parse, you can use function ExeParseCommandLine.

Forum Jump:

Users browsing this thread: 1 Guest(s)