← Back to team overview

sikuli-driver team mailing list archive

Re: [Question #240806]: Threading issue in swing GUI with type()

 

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

    Status: Open => Answered

RaiMan proposed the following answer:
Sikuli's keyboard and mouse actions are internally implemented using
java.awt.Robot and the used functions per definition cannot be run in
code, that is dispatched from the Java Swing GUI dispatcher (EDT).

... which means it cannot be used in any methods that are added to GUI
elements as event listeners.

The only solution is to delegate the call of the stuff containing the
above Sikuli features to your own listener thread, that is triggered
using notify() from the GUI element action function.

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