← Back to team overview

sikuli-driver team mailing list archive

Re: [Question #676037]: JAVA API : hotkey working just first time?

 

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

masuo proposed the following answer:
@Dado

Variable "running" is global ?
By popup window you can confirm hotkey is available .

This code works as expected.
[example as python:]
flag = True
def handler(event):
    global flag
    popup("Hotkey!")
    flag = False

Env.addHotkey(Key.F1,KeyModifier.CTRL,handler)

while True:
    popup("[OK]")
    if flag == False:
        break

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