How to create a batch file to run multiple sikuli scripts one after one.

Asked by Saket

Hi, I have installed sikuli on desktop : on path C:\Users\OpenSpace002\Desktop\Sikuli

and i want to create a bat file to run multiple scrips which are saved in folders C:\Users\OpenSpace002\Desktop\Sikuli\Test\Tes1.sikuli
C:\Users\OpenSpace002\Desktop\Sikuli\Test\Tes2.sikuli
C:\Users\OpenSpace002\Desktop\Sikuli\Test\Tes3.sikuli

I have created batch file as
@echo off
start /i /b /wait C:\Users\OpenSpace002\Desktop\Sikuli.runsikulix -r C:\Users\OpenSpace002\Desktop\Sikuli\Test\Test1.sikuli
ECHO Ran project 1
start /i /b /wait C:\Users\OpenSpace002\Desktop\Sikuli.runsikulix -r C:\Users\OpenSpace002\Desktop\Sikuli\Test\Test2.sikuli
ECHO Ran project 2

but on executing this batch file - getting error as "windows can not find 'C:\Users\OpenSpace002\Desktop\Sikuli.runsikulix'. Make sure you typed named correctly, and then try again. "

Question information

Language:
English Edit question
Status:
Solved
For:
SikuliX Edit question
Assignee:
No assignee Edit question
Solved by:
masuo
Solved:
Last query:
Last reply:
Revision history for this message
masuo (masuo-ohara) said :
#2

You have to learn "How to run SikuliX from Command Line".
http://sikulix-2014.readthedocs.io/en/latest/faq/010-command-line.html

"Running scripts and snippets from within other scripts and run scripts one after the other" is helpful for you.
http://sikulix-2014.readthedocs.io/en/latest/scripting.html#running-scripts-and-snippets-from-within-other-scripts-and-run-scripts-one-after-the-other

Revision history for this message
Saket (saket0123) said :
#3

Hey,
Already tried for this - How to run SikuliX from Command Line
could not run from command line it gives some error

 -r, --run <sikuli-folder/file> (one or more entries seperated by space)

can you help me to run
C:\Users\OpenSpace002\Desktop\Sikuli\Test\Tes1.sikuli
C:\Users\OpenSpace002\Desktop\Sikuli\Test\Tes2.sikuli
C:\Users\OpenSpace002\Desktop\Sikuli\Test\Tes3.sikuli

these scrips from command prompt : which command should i run ?

Revision history for this message
Best masuo (masuo-ohara) said :
#4

PATH-TO-SIKULIX\runsikulix.cmd -r <sikuli-folder/file>

Is PATH-TO-SIKULIX "C:\Users\OpenSpace002\Desktop\Sikuli", isn't it?

how to run SikuliX from Command Line is "C:\Users\OpenSpace002\Desktop\Sikuli\runsikulix.cmd -r C:\Users\OpenSpace002\Desktop\Sikuli\Test\Test1.sikuli"

Revision history for this message
masuo (masuo-ohara) said :
#5
Revision history for this message
Saket (saket0123) said :
#6

Is PATH-TO-SIKULIX "C:\Users\OpenSpace002\Desktop\Sikuli", isn't it? -- Yes path is right ...

Thanks for your response will try this now..... and will update you.

Revision history for this message
masuo (masuo-ohara) said :
#7
Revision history for this message
Saket (saket0123) said :
#8

Thanks masuo, that solved my question.

Revision history for this message
Saket (saket0123) said :
#9

Hey Masuo, Thanks this worked properly : "C:\Users\OpenSpace002\Desktop\Sikuli\runsikulix.cmd -r C:\Users\OpenSpace002\Desktop\Sikuli\Test\Test1.sikuli"

I could run it from command prompt
Thank you so much...

Revision history for this message
Saket (saket0123) said :
#10

Hi Masuo,

kindly help me with this new query :
https://answers.launchpad.net/sikuli/+question/403722