I'm having trouble getting an ahk script to work with AutoHotkey. This issue only comes up with foobar.
What I'm trying to do is once I'm over a certain control like the genre field control is to do:
1. Click then pause till it goes into edit mode
2. Select all text in the edit field
3. Paste
4. Enter
It appears ahk has trouble focusing foobar with this simple command, which could be the cause of my problem:
winactivate, ahk_exe foobar2000.exe
Here's my code which currently not is working but it's a glimpse at what I'm trying to achieve for those of you that know ahk more than I do and could help out:
If WinActive("ahk_Exe foobar2000.exe") {
; MsgBox foobar2000.exe is active.
ControlGetFocus, ctrlWithFocus
; I'm using Columns UI, so these controls below may differ.
If (ctrlWithFocus = "NGLV3") {
MsgBox foobar2000.exe is active and over the NGLV3 control.
Send {LButton}
sleep 500
Send {LButton}
sleep 600
ControlGetFocus, ctrlWithFocus
If (ctrlWithFocus = "Edit4") {
MsgBox foobar2000.exe is active and over the Edit4 control.
Send ^a
sleep 200
Send ^v
sleep 200
Send {ENTER}
}
}
}