Page 1 of 1

Can you make me a repeating script that repeats /!rtv and /!revoke in that order with F5 and stop with F3

Posted: 19 May 2018, 19:22
by yeetererere
I want it to repeat constantly until i press F3 and start with F5

Re: Can you make me a repeating script that repeats /!rtv and /!revoke in that order with F5 and stop with F3  Topic is solved

Posted: 20 May 2018, 01:52
by Louis Tully
Mornin'.

You can try this:

Code: Select all

F5::

Loop

{
	Send /{!}rtv
	if GetKeyState("F3", "P") 
        break  
}

return

Re: Can you make me a repeating script that repeats /!rtv and /!revoke in that order with F5 and stop with F3

Posted: 20 May 2018, 03:05
by SirRFI
Generally, having a loop in hotkey isn't the best idea. Following also allows you to extend the script by any number of things you want to send without duplicating code.

Code: Select all

SendMode, Input
to_repeat := ["/!rtv", "/!revoke"]
return

F5::SetTimer, repeat, ON
F3::SetTimer, repeat, OFF

repeat:
loop % to_repeat.length()
{
	send % "{raw}" to_repeat[A_Index]
	sleep 1000
}
return

Re: Can you make me a repeating script that repeats /!rtv and /!revoke in that order with F5 and stop with F3

Posted: 21 May 2018, 10:47
by Rangerbot
Click on ✔ (Accept this answer) on top-right part of the post if it has answered your question / solved your problem.
i think SirRFI has nailed it! :beer: