My AHK hotkeys DO trigger the functions in my script, but these commands are ignored. If I add, for example, "msgbox, running the function", the dialogue box appears. In the script below, I activate the given window (that is underneath the pointer)...then if I add "WinGetActiveTitle", this works as well (I can use msgbox, %Title% to confirm this)
MouseGetPos gets the correct Window %id% as shown by Window Spy, but Window Spy does not provide the Window's class (it's blank).
If I am over a different Window (i.e. Notepad), the function executes correctly.
What might be preventing MouseMove/MouseClick from working?
Code: Select all
MyFunction()
{
CoordMode, Pixel, Relative
CoordMode, Mouse, Relative
MouseGetPos, tx, ty, id, control
WinActivate, ahk_id %id%
sleep, 70
MouseMove, 305, 461 ; only added in hopes that it helped
sleep, 70
MouseClick, left, 305, 461
CoordMode, Mouse, Screen
CoordMode, Pixel, Screen
return