How do I automatically repeat /replay a script?

Asked by Costaki on 2010-02-01

I'm trying to monitor something and require to loop my script. Can anyone help me with my loop issue?

Thanks!

Question information

Language:
English Edit question
Status:
Answered
For:
Sikuli Edit question
Assignee:
No assignee Edit question
Last query:
2010-02-01
Last reply:
2010-10-02
Sergey Darovskih (darovskih) said : #1

You can use BAT file like this:

@echo on
:loop
sikuli-script YOURSCRIPT.sikuli
PING 1.1.1.1 -n 1 -w 60000 >NUL
goto loop

This file will start your sikuli script once a minute (60000 milliseconds). You can find command line tool "sikuli-script" here http://groups.csail.mit.edu/uid/sikuli/download.shtml.

B West (batphreak) said : #2

To get the above loop to work on my machine running WinXP I had to use the following:

:start
call "C:\Program Files\Sikuli\Sikuli-IDE.bat" "C:\copytoDIM.skl"
set choice=
goto start

Without using "call" for the Sikuli-IDE.bat the end of the sikuli .bat would exit the .bat from which it started, therby ignoring the loop.

Sergey Darovskih (darovskih) said : #3

you'd better use command line tool for this, not IDE

droid8622 (droid8622) said : #4

I have made a recursion - the skl file just launch itself at last operation)))

Can you help with this problem?

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

To post a message you must log in.