Page 1 of 1

Make Loop With Timers

Posted: 02 Jan 2019, 01:00
by Hampoon
So I'm pretty new to AHK and I'd like to make it so that it, for example, does: Send, f!IBakedYouAPie! then send Send, {Enter} every 294381 ms but then send after 12199 it sends Send, OhBoyWhatFlavor?!PieFlavored! then Send, {Enter}
How can I do this?

Re: Make Loop With Timers

Posted: 02 Jan 2019, 05:13
by hymal7

Code: Select all

WinActivate ahk_exe notepad.exe		;assuming this is where you want to send the text
Send, f{!}IBakedYouAPie{!}

loop, 10		;you havent mentioned how many times to loop so I've put 10
{
	send {enter}
	sleep 294381
}

sleep 12199
send, OhBoyWhatFlavor?{!}PieFlavored{!}
send, {enter}

;#######################################################################
exitapp
esc::ExitApp