empty output when running sikuli script from command line

Asked by andrea on 2012-01-26

Hi all,
I am developing a sikuli script on Windows XP platform and I have a strange behaviuor on this line:

sessionid=run("cmd.exe /C sessioninfo s") - This is a Citrix command to identify my session on the Citrix Server.

When I run from Sikuli.IDE it work perfectly and return the value in the variable.

If I try to run my sikuli script from windows run application with the following command:
cmd /c "C:\Program Files\Sikuli X\Sikuli-IDE.exe" -r D:\Sikuli\myscript\test_subprocess.sikuli

the variable sessionid is empty.

Does anyone can help me to solve my problem?

thanks
Andrea

Question information

Language:
English Edit question
Status:
Solved
For:
Sikuli Edit question
Assignee:
No assignee Edit question
Solved by:
RaiMan
Solved:
2012-01-27
Last query:
2012-01-27
Last reply:
2012-01-27
Best RaiMan (raimund-hocke) said : #1

Try to use Sikuli-IDE-w.bat instead of the .exe.

Try to use os.popen or even Jython's subprocess module instead of run().

Check what happens, if you run your script from a command line using
java -jar "C:\Program Files\Sikuli X\sikuli-script.jar" -s D:\Sikuli\myscript\test_subprocess.sikuli

andrea (andrea-merli69) said : #2

Thanks RaiMan, that solved my question.

andrea (andrea-merli69) said : #3

Just for my personal interest.
What is the main difference using ide-w bat or ide.exe?

andrea

RaiMan (raimund-hocke) said : #4

I do not know it for sure, sorry. What I know: that in most cases where the .exe fails, the .bat versions run ok ;-)