Possible to prevent trace windown when running from cmd line?

Asked by Stephen

Hi,

I have written a number of tests and they are runing successfully from the command line in Windows XP. The problem is that when each test script executes it opens a new trace window that logs all the inputs.

Is it possible to prevent this trace window from opening?

Thanks.

Question information

Language:
English Edit question
Status:
Solved
For:
SikuliX Edit question
Assignee:
No assignee Edit question
Solved by:
Stephen
Solved:
Last query:
Last reply:
Revision history for this message
RaiMan (raimund-hocke) said :
#1

--- it opens a new trace window that logs all the inputs.

trace window??? what is that?

logs all the inputs. ??? what do you mean with inputs?

How do you run the scripts from command line?

Revision history for this message
Stephen (stlennon21) said :
#2

I have written a VB application that can call the .sikuli scripts. The VB appliation will call a .bat file called test1.bat for example.

----
@echo off
cd C:\Program Files\Sikuli X
START "Automated String Test" "Sikuli-IDE.bat" -t AS00.sikuli
----

So far it works perfectly. I can choose what scripts I want from the VB app and using a bat file it will execute fine. However, the bat file creates a command line window that remains open. In this window I can see all the commands that are being executed within the Sikuli script, i.e.

[log] CLICK on <733,64>
[log] Alt + TYPE "f"
[log] TYPE "x"

We sometimes call this window a trace window. This window remains open with a prompt of C:\Program Files\Sikuli X>

I tried adding an EXIT statement to my .bat file but this doesn't work. I guess this may not be related to Sikuli really and more to do with running bat files.

Revision history for this message
Stephen (stlennon21) said :
#3

I'm fixed up this issue.

I changed the VB appliation that calls the Sikuli script to kill the cmd.exe when finished.

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

You might have a look at os.popen() in Python that allows, to run a command in a subprocess, without any additional command line windows at all. You might even use module subprocess to run as many Sikuli scripts in parallel as you want.

a simple command to run a Sikuli script (supposing the environment is set up to run Sikuli scripts from command line):

java - jar path-to-sikuli-script.jar path-to-you-name-it.sikuli