- I press F8, it holds down a (if you have a notepad open it would spam aaaaaaaaaaaaaa)
- while it is spamming "a", I want it to click back and forth between my x1y1 and x2y2, 62 times, followed by a click on x3y3 and x4y4, then repeat 7 times
- If i remove the Send a up/down it does everything correctly
I know "a down" and "a up" is not the correct thing to put in here but it's just there to help explain what I want to happen. I've been looking on this forum and online for answers and have not gotten any progress. Any help is greatly appreciated!
Code: Select all
#MaxThreadsPerHotkey 4
CoordMode Pixel, window
CoordMode Mouse, window
toggle := 0
F8::
toggle += 1
if (toggle = 1) {
loop, 7 {
Random, x1, 1400, 1516
Random, y1, 909, 978
Random x2, 1590, 1695
Random y2, 442, 515
Random x3, 1013, 1044
Random y3, 722, 749
Random x4, 865, 891
Random y4, 583, 613
Send {a down}
loop, 62 {
MouseClick, left, x1, y1,,,,
Sleep, 200
MouseClick, left, x2, y2,,,,
Sleep, 200
}
Send {a up}
Sleep, 200
MouseClick, left, x3, y3,,,,
Sleep, 200
MouseClick, left, x4, y4,,,,
Sleep, 200
}
}
F9::reload
F10::exitapp