Help with a simple ahk script

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
deffafnq
Posts: 5
Joined: 16 Sep 2021, 15:08

Help with a simple ahk script

16 Sep 2021, 15:20

Hello everyone who needs help writing a very simple script, the task is simple, you need the script
by pressing F6, it began to work, hovered along the coordinates (x2886 y583) and pressed the left key on the mouse and waited 7 seconds, and later moved to the second coordinates (x2442 y715), pressed and waited 10 seconds, and so that the script would work in a circle until again press F6
User avatar
mikeyww
Posts: 26888
Joined: 09 Sep 2014, 18:38

Re: Help with a simple ahk script

16 Sep 2021, 16:25

Code: Select all

#MaxThreadsPerHotkey 2
F6::
on := !on
While on {
 Click, 2886 583
 Loop, 14
  Sleep, 500 * on
 Until !on
 If on
  Click, 2442 715
 Loop, 20
  Sleep, 500 * on
 Until !on
}
Return
deffafnq
Posts: 5
Joined: 16 Sep 2021, 15:08

Re: Help with a simple ahk script

17 Sep 2021, 02:52

Thank you very much for your help, is it possible to add a looped button press (E) by pressing F7 to this script?
User avatar
mikeyww
Posts: 26888
Joined: 09 Sep 2014, 18:38

Re: Help with a simple ahk script

17 Sep 2021, 05:10

Code: Select all

F7::SetTimer, F7 Up, % (f7 := !f7) ? 10 : "Off"
F7 Up::Send % f7 ? "e" : ""

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: Frogrammer, gongnl and 265 guests