empty output when running sikuli script from command line

Asked by andrea

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:
SikuliX Edit question
Assignee:
No assignee Edit question
Solved by:
RaiMan
Solved:
Last query:
Last reply:
Revision history for this message
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

Revision history for this message
andrea (andrea-merli69) said :
#2

Thanks RaiMan, that solved my question.

Revision history for this message
andrea (andrea-merli69) said :
#3

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

andrea

Revision history for this message
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 ;-)