Looking to make this simple piece a loop

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
JacksonJarrhead
Posts: 1
Joined: 23 May 2018, 09:40

Looking to make this simple piece a loop

23 May 2018, 10:31

Hi guys, I'm looking to for help on something I would imagine is pretty simple but I've no idea how to do it myself, and would love some help!
Short and sweet, here's my work:

Code: Select all

Loop
{PgUp::
	Click, 1284, 505		
	Sleep 1200
	MouseMove, 2376, 770
send {shift down}
Loop
	{
	 send {LButton}
	 GetKeyState, state, D
	 Sleep, 100
	 if state = U
	 break
	}
send {shift up}
return
}

return

Escape::
ExitApp
Return
What I'm trying to do is have these steps repeated over and over in an endless loop; the click, move, shift + left click, repeat. With escape being the key used to break the loop.
Any and all help would be awesome, thanks in advance!
Rohwedder
Posts: 7677
Joined: 04 Jun 2014, 08:33
Location: Germany

Re: Looking to make this simple piece a loop

23 May 2018, 11:35

Hallo,
try:

Code: Select all

PgUp::
Loop
{
	Click, 1284, 505
	Sleep 1200
	MouseMove, 2376, 770
	send {shift down}
	Loop
	{
		send {LButton}
		GetKeyState, state, d
		Sleep, 100
		if state = U
			break
	}
	send {shift up}
}
return
Escape::
ExitApp
Return

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: Google [Bot], jdfnnl and 127 guests