← Back to team overview

sikuli-driver team mailing list archive

Re: [Question #264483]: 1.0.1 how to run sikuli script from command line

 

Question #264483 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/264483

    Status: Solved => Open

eduardobedoya is still having a problem:
Hi RaiMan, I guess I could reopen this question, for a little issue very
related to it, instead of making a new question

As I said, I get several scripts to work by doing this...

def openlastone(event):
    runScript("C:\Sikuli\scripts\lastone")
Env.addHotkey(Key.F1, KeyModifier.CTRL+KeyModifier.SHIFT+KeyModifier.ALT, openlastone)

def openquestionmark(event):
    runScript("C:\Sikuli\scripts\questionmark")
Env.addHotkey(Key.F2, KeyModifier.CTRL+KeyModifier.SHIFT+KeyModifier.ALT, openquestionmark)

while True:
    wait(2)

each one has its own hotkey
I execute one script at time, but usually the scripts are run in sequence
eg.
if I got: Script A, Script B, Script C, Script D, Script E, Script F
I usually run the script in sequence like AEBDCF, and FAECBD, and any in order

My problem is that if I send the ScriptA shorcut keys (lets say Shift+F1) and then whithout notice
send the ScriptE shorcut keys (Shift+F5) while ScriptA is still running, Sikuli gets stuck and does not perfom any script untill I Stop and rerun the MainScript.
Is there a way to tell Sikuli Main script to wait until a currently running def script is completed before launch any other def script?

I say this because Im using Sikuli to compensate a MacroRecorder lack of image recognition
So I autorun these scripts using a this macrorecorder, so that's why scripts run multiple time in sequence.

Hope this make sense, and have a fair solution.
Thanks Advanced. Rainman.

-- 
You received this question notification because you are a member of
Sikuli Drivers, which is an answer contact for Sikuli.