0

I'm trying to create a hotkey for a software button inside a program since the devs of the program did not do so.

Here is what I tried to move the mouse, click the button and move the mouse back to the original position:

F3::
CoordMode, ToolTip, Screen
MouseGetPos, X, Y
Click 512, 516
MouseMove, %X%, %Y%
Return

This works, on say the desktop, but when the program window is active, nothing happens. Is there some way to make this work inside the program window?

3
  • You could ask this question on stackoverflow, it has a larger community, more programming experts than here, and there is an autohotkeys tag on stackoverflow too. You could also try on the autohotkeys forum autohotkey.com/boards But do add the answer here if you find one elsewhere.
    – barlop
    Jul 31, 2017 at 14:22
  • Which program are you using this in? Does it run windowed or fullscreen?
    – Silas B
    Jul 31, 2017 at 20:26
  • Hi, it runs windowed. It's this scientific tool to clean and analyze physiological data called BPV.
    – Arkansin
    Jul 31, 2017 at 21:25

1 Answer 1

0

The CoordMode command may need to be set for the mouse, not for ToolTip. Set it for whichever mode your coordinates are relative to (screen, window, client, etc.--see documentation)

You may also want to add an #IfWinActive statement to limit scope on the shortcut key binding by making it only work when a window from the desired executable is active, i.e., #IfWInActive ahk_exe BPV.exe or whatever your program is.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .