Need some help on a loop script Topic is solved
Need some help on a loop script
So uh,i need some help, i want a script so that when you press U, it presses "o", after 2 seconds, presses kp_end, then after 10minutes, presses "p" then after 2seconds, it pressed kp_end again, then loops around, bit complicated, i hope i explained it well enough
Re: Need some help on a loop script Topic is solved
Hi,
that would be the script:
When you press Esc, the loop will stop (but it will run till the end).
Alternatively, you could use this code, which will kill the script immediately.
Regards
that would be the script:
Code: Select all
u::
while !stop
{
Send o
Sleep, 120000 ; 120000 ms pause = 120 sec pause = 2 min pause
Send {Numpad1}
Sleep, 600000 ; 600000 ms pause = 600 sec pause = 10 min pause
Send p
Sleep, 120000 ; 120000 ms pause = 120 sec pause = 2 min pause
}
return
Esc::
stop = 1
return
Alternatively, you could use this code, which will kill the script immediately.
Code: Select all
u::
Loop
{
Send o
Sleep, 120000 ; 120000 ms pause = 120 sec pause = 2 min pause
Send {Numpad1}
Sleep, 600000 ; 600000 ms pause = 600 sec pause = 10 min pause
Send p
Sleep, 120000 ; 120000 ms pause = 120 sec pause = 2 min pause
}
return
Esc::
ExitApp
return
Please use [code][/code] when posting code!
Keyboard: Logitech G PRO - Mouse: Logitech G502 LS - OS: Windows 10 Pro 64 Bit - AHK version: 1.1.33.09
Keyboard: Logitech G PRO - Mouse: Logitech G502 LS - OS: Windows 10 Pro 64 Bit - AHK version: 1.1.33.09
Re: Need some help on a loop script
Thanks mate! <3<3 but uh, needed it to be 2second pause, not 2 minutes, but thas fine.
Re: Need some help on a loop script
Nice that I could help you!
Sorry, seems I missed that, but you can easily change it - probably you've already done it
Regards
Sorry, seems I missed that, but you can easily change it - probably you've already done it
Regards
Please use [code][/code] when posting code!
Keyboard: Logitech G PRO - Mouse: Logitech G502 LS - OS: Windows 10 Pro 64 Bit - AHK version: 1.1.33.09
Keyboard: Logitech G PRO - Mouse: Logitech G502 LS - OS: Windows 10 Pro 64 Bit - AHK version: 1.1.33.09