Windows: can't launch sikuli script (.skl) from command line

Asked by ironmantis7x

I am trying to run a sikuli executable that I exported from a script from the command line in Windows 7 and it will not run at all.
I receive no errors what so ever.

here is my batch file:
#start
"c:\Program Files(x86)\Sikuli X\Sikuli-IDE" - r C:\Users\V411460\Documents\Sikuli Android Tests\TWC_Login_Live_TV_Test.skl
#end

What am I doing wrong??

ironmantis7x

Question information

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

Same machine?

Since it seems to be Win7 64Bit: JRE 6 32Bit installed and active? (no JRE 7 !!!)

--- that I exported from a script from the command line
What should that mean?
 .skl (which are only zipped versions of the .sikuli folder and not at all executable files that can be run standalone (like a .exe)) can only be created from inside the IDE.

--- what is .skl good for?
the only advantage over a .sikuli is, that it is only one file and not a folder containing might be many files. So you might send it easier by mail or upload/download it easier to/from the net.
In your own environment they usually do not make sense and have no advantages against the .sikuli folder (e.g. for scripts I want to use on different machines, I simply put the .sikuli foder on my dropbox)

Revision history for this message
ironmantis7x (ironmantis7x) said :
#2

- Yes it is the same machine (win7 64 bit machine)
- what I meant to say was I saved used the export executable from the file menu to make a sikuli executable script.
- I thought that skl was the extension of a script.

So how should I run this script??

ironmantis7x

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

- just save it normally (it becomes a folder .sikuli)
- the path should not contain any blanks or special characters and must be at least one level beyond a drive's root

run it:
"c:\Program Files(x86)\Sikuli X\Sikuli-IDE.bat" -s -r path-to-your-script.sikuli

or (no extra commandline window):
"c:\Program Files(x86)\Sikuli X\Sikuli-IDE-w.bat" -r path-to-your-script.sikuli

for your first tests you should use version 1, so you can see something on command line.

Revision history for this message
ironmantis7x (ironmantis7x) said :
#4

Thanks for this!!!
My script is now working (so far).

Question:  where is the output file of the test run located at (using the -s option)??

ironmantis7x

----------------------------------------------------
Lizard (#4): Leave it to my friend. He can do it!
Scorpion (#3): And who is your friend?
Lizard (#4): A first class kung fu man; an expert!

________________________________
 From: RaiMan <email address hidden>
To: <email address hidden>
Sent: Monday, August 6, 2012 10:41 AM
Subject: Re: [Question #205142]: Windows: can't launch sikuli script (.skl) from command line

Your question #205142 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/205142

    Status: Needs information => Answered

RaiMan proposed the following answer:
- just save it normally (it becomes a folder .sikuli)
- the path should not contain any blanks or special characters and must be at least one level beyond a drive's root

run it:
"c:\Program Files(x86)\Sikuli X\Sikuli-IDE.bat" -s -r path-to-your-script.sikuli

or (no extra commandline window):
"c:\Program Files(x86)\Sikuli X\Sikuli-IDE-w.bat" -r path-to-your-script.sikuli

for your first tests you should use version 1, so you can see something
on command line.

--
If this answers your question, please go to the following page to let us
know that it is solved:
https://answers.launchpad.net/sikuli/+question/205142/+confirm?answer_id=2

If you still need help, you can reply to this email or go to the
following page to enter your feedback:
https://answers.launchpad.net/sikuli/+question/205142

You received this question notification because you asked the question.

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

--- (using the -s option)
This only redirects Java error popups to stdout on command line

--- where is the output file of the test run located at
there is no output file, if you have not scripted any.
all regular print output goes to stdout and is seen on command line, you might pipe it to a file using >

Revision history for this message
Shubham Soin (s-soin99) said :
#6

whenever i run through bat file as told by Sir RaiMan, i get a prompt having various options of debugging level,etc and when i click Ok, the program doesn't runs

Can you help with this problem?

Provide an answer of your own, or ask ironmantis7x for more information if necessary.

To post a message you must log in.