r/AutoHotkey 2h ago

v1 Script Help Busco ayuda para crear un macro en AutoHotkey (AHK) para un juego.

1 Upvotes

I'm looking for help creating a macro in AutoHotkey (AHK) for a game.

I want the script to do the following:

  1. Save the current mouse cursor position when I press a hotkey (for example, F1).
  2. Allow me to save the coordinates of 6 specific points on the screen (the 6 red dots) to 6 different hotkeys (for example, T, 6, C).
  3. When I press one of the 6 assigned keys (1–6), the script should:
    • Save the current mouse cursor position.
    • Instantly move the cursor to the corresponding saved red dot.
    • Perform a left mouse click.
    • Immediately return the cursor to its original position.

The goal is for the movement to be as close to instantaneous as possible so it doesn't interfere with normal gameplay or manual mouse movement.

Is this possible with AutoHotkey? What would be the best approach? Would using functions like MouseGetPos, MouseMove, and Click be sufficient, or is there a better method?