help with 2 simultaneous loops

Get help with using AutoHotkey and its commands and hotkeys
ArmyKnife
Posts: 1
Joined: 22 Aug 2018, 05:41

help with 2 simultaneous loops

22 Aug 2018, 05:50

hello

I currently have a simple loop that presses my w key ever 1.1 seconds. I would like my script to include another loop to run simultaneously with my current loop and by that i mean i would like for my script to press my q button every 2 minutes(120000). basically keep pressing w every second but also every 2 mins press the q button. could anyone help me with this.

looping := false
^o::
looping := true
while(looping = true)
{
send, w
Sleep 1100
}
return
^p::
looping := false
return
Noo0B
Posts: 73
Joined: 26 Jan 2018, 19:54

Re: help with 2 simultaneous loops

22 Aug 2018, 07:00

You may want to test this:

Code: Select all

SetTimer, w, 1100
SetTimer, q, 120000
w:
	Send w
Return
q:
	Send q
Return
You should try the help file for more info.
Regards

Return to “Ask For Help”

Who is online

Users browsing this forum: aldrinjohnom, hasantr, Odlanir, rommmcek, Xtra and 188 guests