← Back to team overview

sikuli-driver team mailing list archive

Re: [Question #691935]: Are mouse and keyboard actions thread safe? --- generally no!

 

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

    Status: Answered => Solved

Jaroslav Novotny confirmed that the question is solved:
Thanks for the quick response and clarification.

My use case is to perform mouse clicks and type in input fields of multiple GUIs, that each has animations. These animations range from 1sec to about 5sec, and it usually goes like:
- click some pattern
- wait for another pattern to show up (1-5s)
- click another pattern or type into a field

So I want to execute code for each GUI in different thread, so when one
is waiting for element to show up, another thread can perform actions on
the other GUI.

I'll wrap the sikuli calls into a virtualUser class that will have
synchronized methods, so only one thread at a time can use the keyboard
and mouse. That should do the trick.

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