← Back to team overview

sikuli-driver team mailing list archive

Re: [Question #295811]: main test and events

 

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

    Status: Open => Answered

RaiMan proposed the following answer:
Yep, that is not possible using observeInBackground()
... and will not be a feature in version 1.1.x (on the list for version 2: some global locking)

With the latest SikuliX (nightly 1.1.1)  it is only guaranteed, that
mouse actions on the same region object are done completely one after
the other (e.g. move and click). In versions before even mouse actions
in main and handler could be mixed up.

One possible way is to use a global variable to communicate between main
and handler, set it in the handler at entry, unset it in the handler at
exit and then in main check the state before going into critical
sections.

Another option always is, to redesign the workflow to get rid of
observeInBackground() (e.g. use observe/exists at respective places in
the workflow)

-- 
You received this question notification because your team Sikuli Drivers
is an answer contact for Sikuli.