Loop doesn't work for me.. PLEASE HELP

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
cloudyminds
Posts: 4
Joined: 17 Jul 2017, 13:05

Loop doesn't work for me.. PLEASE HELP

21 Jul 2017, 23:39

Like the title says, my loop doesn't work. Here's the script:


#NoEnv
#SingleInstance force
SetKeyDelay, 30,50
SendMode, Event

Return

^o::
Loop 168
KeyWait, x
Send, {Enter Down}
Sleep, 100
Send, {Enter Up}
^l::ExitApp
Helgef
Posts: 4709
Joined: 17 Jul 2016, 01:02
Contact:

Re: Loop doesn't work for me.. PLEASE HELP

22 Jul 2017, 01:56

You need to use brackets to define the loop block. Eg,

Code: Select all

#NoEnv
#SingleInstance force
SetKeyDelay, 30,50
SendMode, Event

Return

^o::
	Loop 168
	{
		KeyWait, x			; This means wait for x to be released, if you want to wait for x to be pressed, use: KeyWait, x, Down
		Send, {Enter Down}
		Sleep, 100
		Send, {Enter Up}
	}
return	
return
^l::ExitApp
Good luck.

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: Chunjee, inseption86, jaka1, LuckyJoe, Rohwedder and 325 guests