← Back to team overview

sikuli-driver team mailing list archive

Re: [Question #215002]: Mac: how to use addHotkey() and use it without modifier key

 

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

Robert posted a new comment:
Thanks for the input. I did as you said and things work, the only issue
is that When the active window is D3 the script does not pick up any of
the hotkeyevents. Only way to send events is that the active window in
the sikuli screen. Anyway to tell the script to wait for inputs from D3?
Once again thanks for the prompt help really appreciate it.

def Rattack(event):
    myApp.focus()
    wait(1)
    mouseDown(Button.RIGHT)
    wait(3)
    mouseUp(Button.RIGHT)
    print "done right"
    
def Lattack(event):
    mouseDown(Button.LEFT)
    wait(2)
    mouseUp(Button.LEFT)

Env.addHotkey(Key.NUM4,0, Rattack)
Env.addHotkey(Key.NUM5,0, Lattack)
 
myApp = App("Diablo III")
myApp.focus()
 
playground = App.focusedWindow()

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