Replies: 1 comment 1 reply
-
If you are using AutoHotkey v2, chances are you have to specify the control you want to send to. I'm guessing that's the issue you're running into. This is described in the README section describing differences between AHK v1 and v2. In AutoHotkey v1, the default is to send to the topmost control, which usually does the correct thing. For example: In AutoHotkey v1 this works: ahk = AHK(version='v1')
notepad = ahk.find_window(title='Untitled - Notepad')
notepad.send('hello') But in AutoHotkey version 2, the above does not work and you need to specify the control: ahk = AHK(version='v2')
notepad = ahk.find_window(title='Untitled - Notepad')
notepad.send('hello', control='Edit1') You can use the |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I have the bellow code, where when I try to send a key or a click using the window not work, if I change to use ahk instead of win, it works perfectly, but now using a window
I used other methods to know if the right window is being selected and all of them shows that is right window, the calculator in this case.
Beta Was this translation helpful? Give feedback.
All reactions