Running Sikuli scripts automatically in Windows (trouble getting it to work...)

Asked by laughfactory on 2010-01-31

I've tried all the command line options for getting scripts to run via .bat file on Windows 7...to no avail.

My skill as a programmer/tech-head is, apparently, up to the task of successfully creating a Sikuli script that does exact what I want it to...but not up to the task of creating an executable (or even bat --> script file) version of said script that works.

Sikuli is AMAZING in it's simplicity and usability, but in order for it to truly be useful the process of creating a shortcut to run Sikuli scripts has to be made MUCH MUCH MUCH easier.

Thanks for your genius and generosity sharing this with the world!

Regards, Abe

Question information

Language:
English Edit question
Status:
Answered
For:
Sikuli Edit question
Assignee:
No assignee Edit question
Last query:
2010-01-31
Last reply:
2010-05-26
ac (piric2) said : #1

I had the same problem, and here is the solution: you need to enclose both the bat and script name in separate quotation marks, like this:

"C:\Program Files\Sikuli\Sikuli-IDE.bat" "C:\Program Files\Sikuli\script.skl"

This worked for me in windows server 2003.

DrakonIsterwall (laber-nix3) said : #2

then i get the error that he can not find my xxx.py file ^^

Ricky (rickyahernandez) said : #3

I am having the same issue "xxx.py the system cannot find the path specified"

Libo Cao (libocao) said : #4

I tried to run command line mode on both Windows XP and Mac OS snow leopard. No luck in both.

On windows I also tried what "ac" mentioned in previous post, but all it does is to generate a tmplib with three dll files. No error message and it does not execute the skl file at all.

Sikuli User (hidden-hidden) said : #5

It's working for me in Windows 7 - "C:\Program Files\Sikuli\Sikuli-IDE.bat" "C:\Program Files\Sikuli\script.skl"

However, I remember having a problem when I first tried that. I think that I reinstalled Sikuli and know everything is fine.

Libo Cao (libocao) said : #6

I got it working based on this post
https://answers.launchpad.net/sikuli/+question/100436

but it does not work for 0.10.1 only for 0.9

will need to figure out how to do the same thing for 0.10.1

hi I want to save a sikuli script and run or execute it I dont know how to do this 0.10.1.

I would really appreciate if naybody could help.

Libo Cao (libocao) said : #8

@dnyaneshwari:

you can follow the instruction above if you are using a mac.

you can directly do sikuli-IDE.app *.skl or *.sikuli if you are using windows.

you can also just follow this post. it works for 0.10.1 for me
https://answers.launchpad.net/sikuli/+question/100436

I just tested it.

If you are stuck, please provide detailed info -- OS, your procedures and error message so that people can help you.

Hi Libo,
thanks a lot I am on windows Xp I saved the script using import executable in File tab, then i right clicked on my executable and said open with the batch file of sikuli and it gave me a error message : runtime error when running C:\ some path
traceback most recent call last :

I cannot wirte the error message its too big :(

But I was wondering if the two lines whicha are mentioned in the above blog should be typed on the command prompt of windows Xp.

I am new to Sikuli so ther is bit difficulty.

I would really appreciate your help.

Hope to hear from you soon.

Thanks

Libo Cao (libocao) said : #10

@dnyaneshwari:

you can simply try the above method, on command line mode, do things like this

"C:\Program Files\Sikuli\Sikuli-IDE.bat" "C:\Program Files\Sikuli\script.skl"

@Libo
Hi thanks a lot It worked for me :)

I

Libo Cao (libocao) said : #12

If you want automation, you do not even need to use GUI to convert them into
.skl file

you can put it in your script do a simple zip ***.sikuli *.skl, then run
that command to execute it directly. the .skl is only a zip file for the
whole .sikuli folder.

Also I believe the .bat file also takes the .sikuli folder directly by doing

"C:\Program Files\Sikuli\Sikuli-IDE.bat" "C:\Program
Files\Sikuli\script.sikuli"

On Wed, May 26, 2010 at 2:58 PM, dnyaneshwari <
<email address hidden>> wrote:

> Question #99400 on Sikuli changed:
> https://answers.launchpad.net/sikuli/+question/99400
>
> dnyaneshwari proposed the following answer:
> @Libo
> Hi thanks a lot It worked for me :)
>
> I
>
> --
> You received this question notification because you are a direct
> subscriber of the question.
>

Tsung-Hsiang Chang (vgod) said : #13

If you need to run .sikuli using Sikuli-IDE.bat, an extra parameter -r is needed; otherwise the .sikuli will be opened in the IDE.
Use Sikuli-IDE.bat -h to see the details.

Libo Cao (libocao) said : #14

Correction on the zip, should be the following:

zip -uj xxx.skl xxx.sikuli/*

On Wed, May 26, 2010 at 3:06 PM, Libo Cao <
<email address hidden>> wrote:

> Question #99400 on Sikuli changed:
> https://answers.launchpad.net/sikuli/+question/99400
>
> Libo Cao proposed the following answer:
> If you want automation, you do not even need to use GUI to convert them
> into
> .skl file
>
> you can put it in your script do a simple zip ***.sikuli *.skl, then run
> that command to execute it directly. the .skl is only a zip file for the
> whole .sikuli folder.
>
> Also I believe the .bat file also takes the .sikuli folder directly by
> doing
>
> "C:\Program Files\Sikuli\Sikuli-IDE.bat" "C:\Program
> Files\Sikuli\script.sikuli"
>
> On Wed, May 26, 2010 at 2:58 PM, dnyaneshwari <
> <email address hidden>> wrote:
>
> > Question #99400 on Sikuli changed:
> > https://answers.launchpad.net/sikuli/+question/99400
> >
> > dnyaneshwari proposed the following answer:
> > @Libo
> > Hi thanks a lot It worked for me :)
> >
> > I
> >
> > --
> > You received this question notification because you are a direct
> > subscriber of the question.
> >
>
> --
> You received this question notification because you are a direct
> subscriber of the question.
>

Can you help with this problem?

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

To post a message you must log in.