App.open doesn't work with variable passed on command line

Asked by Danish Innis

I have a script that opens an app with parameters. When I run it from the ide with a fixed command, it works perfectly.

cmd = "c:/path_to_exe/myapp.exe -- --param1 param1 --param2 param2"
App.open(cmd)

If I try running my script with parameters passed on the command line, it doesn't open the application.

java -jar sikulix-2.0.1.jar -r man-1 --args "c:/path_to_exe/myapp.exe -- --param1 param1 --param2 param2"

import sys
cmd = sys.argv[1]
App.open(cmd)

What am I doing wrong? I've tried several combinations of quotes etc., and while the cmd variable prints out correctly, it does nothing, not even give an error.

Question information

Language:
English Edit question
Status:
Solved
For:
SikuliX Edit question
Assignee:
No assignee Edit question
Solved by:
RaiMan
Solved:
Last query:
Last reply:
Revision history for this message
Danish Innis (techie45) said :
#1

I'm passing in the full path to the executable, btw.

Revision history for this message
RaiMan (raimund-hocke) said :
#3

SikuliX version?

Revision history for this message
Danish Innis (techie45) said :
#4

2.0.1

Revision history for this message
RaiMan (raimund-hocke) said :
#5

ok, will check.

Revision history for this message
Best RaiMan (raimund-hocke) said :
#6

a fix will be available in 2.0.2 and is available in 2.1.0 nightly already now.

Revision history for this message
Danish Innis (techie45) said :
#7

Thank you so much, this solved my problem. Sorry for the late response.

Revision history for this message
Danish Innis (techie45) said :
#8

Thanks RaiMan, that solved my question.