Technical support and scripting issues
Moderators: JRL, Dorian (MJT support)
-
hoangvo81
- Pro Scripter
- Posts: 69
- Joined: Tue Feb 07, 2012 8:02 pm
Post
by hoangvo81 » Wed May 28, 2014 5:00 pm
Hi,
I think I losing it, cause i was sure i could pass parameter via runprogram to an exe, the exe is a macro scheduler created exe
exe code:
Main code:
Code: Select all
let>RP_ADMIN=1
RunProgram>%script_Dir%\displaySelected.exe /selected=123
macro scheduler is complaining that the file does not have a program associated.
if i take out the parameter : /selected=123
mdl display "Selected" as the text so i know the exe works, but i am not sure why i m getting complain about file association when its an exe file.
-
hoangvo81
- Pro Scripter
- Posts: 69
- Joined: Tue Feb 07, 2012 8:02 pm
Post
by hoangvo81 » Wed May 28, 2014 5:04 pm
opening up command prompt manually and typing in the DisplaySelected.exe /selected=123
works fine and display 123
also tried making it into an exe and running it and still the same complain.
-
hoangvo81
- Pro Scripter
- Posts: 69
- Joined: Tue Feb 07, 2012 8:02 pm
Post
by hoangvo81 » Wed May 28, 2014 5:07 pm
yet when i pull the exe back to my desktop and ran it, it's fine.
...
-
hoangvo81
- Pro Scripter
- Posts: 69
- Joined: Tue Feb 07, 2012 8:02 pm
Post
by hoangvo81 » Wed May 28, 2014 5:11 pm
ignore this - i found the problem.
need to enclose the application path in quotes.
runprogram>"%script_Dir%\displayselected.exe" /selected=123
script_dir the folder has spaces so that was causing problem.
but i m not sure why it would run when i remove teh /selected=123 parameter since the spaces is still there.
-
Marcus Tettmar
- Site Admin
- Posts: 7395
- Joined: Thu Sep 19, 2002 3:00 pm
- Location: Dorset, UK
-
Contact:
Post
by Marcus Tettmar » Wed May 28, 2014 6:21 pm
Because without quotes windows will treat the whole string as the path. So without the Parms you can get away without quotes. With the Parms quotes are needed so that windows knows which bit is which.
Sent from my iPad using Tapatalk
-
hoangvo81
- Pro Scripter
- Posts: 69
- Joined: Tue Feb 07, 2012 8:02 pm
Post
by hoangvo81 » Wed May 28, 2014 6:59 pm
Thanks for the explanation.