How to run multiple .sikuli files?

Asked by shardul balaji mahadik

I have 10 .sikuli files. I have to run them one by one sequencially.
Please guide me about this issue.

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

--- make a command file
Windows: a .bat/.cmd where you use Sikuli-IDE.bat
Mac/linux: shell script using sikuli-ide.sh

according to: http://sikuli.org/docx/faq/010-command-line.html

--- make a main script, that executes the others
the above solution adds the startuptime of 3-5 seconds to every script's runtime.
If you do not want this, make a main script with the following content:

import os
dir = "path-to-folder-containing-your-scripts"
# Windows: use raw string r"some text" or double the \

# for each script to run
# repeat this block
script = "some-script" # without .sikuli
scrpy = os.path.join(dir, script+".sikuli", script+".py") # the Sikuli Jython script to run
setBundlePath(os.path.join(dir, script+".sikuli") # to locate the images
execfile(scrpy) # executes the script in this context

# or run the scripts using a loop
for script in ("script1", "script2", "script3"): # names without .sikuli
# add your script names to the above list as needed
    scrpy = os.path.join(dir, script+".sikuli", script+".py") # the Sikuli Jython script to run
    setBundlePath(os.path.join(dir, script+".sikuli") # to locate the images
    execfile(scrpy) # executes the script in this context

Revision history for this message
shardul balaji mahadik (shar-mahadik) said :
#2

App.open("c:\\Program Files\\Internet Explorer\\iexplore.exe")
wait(2)
type("sikuli.org")
wait(6)
Like this can we open .sikuli or .skl files saved in any location.
I tried it but somehow it is not working.
please guide me about this querry .
Is there any other way to excute this kind off steps???

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

That is exactly, what my proposals in comment #1 are doing.

Can you help with this problem?

Provide an answer of your own, or ask shardul balaji mahadik for more information if necessary.

To post a message you must log in.