commands always start from begin

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
kkkaioekn
Posts: 11
Joined: 11 Jun 2018, 22:41
Location: ahk beginner

commands always start from begin

11 Jun 2018, 23:11

hello,

before all, i want to say i'm new in ahk

here is a part of my script:
LButton::
^LButton::
+LButton::
Send {é}
MouseClick ,Left,X,Y,3,0
Send {"}
sleep, % rand(725,727)
MouseClick ,Left,X,Y,3,0
Send {é}
return
my actual problem is: when i click LButton a second time before the end of the script, so the script is restarting from the first line

how can i do to finish these 6 lines of commands while LButton pressed again?

thanks in advance and sorry for my bad english :3
swagfag
Posts: 6222
Joined: 11 Jan 2017, 17:59

Re: commands always start from begin

12 Jun 2018, 04:34

Code: Select all

isDone := true

LButton::
^LButton::
+LButton::
	if !isDone
		return

	isDone := false
	Send {é}
	MouseClick ,Left,X,Y,3,0
	Send {"}
	sleep, % rand(725,727)
	MouseClick ,Left,X,Y,3,0
	Send {é}
	isDone := true
return
kkkaioekn
Posts: 11
Joined: 11 Jun 2018, 22:41
Location: ahk beginner

Re: commands always start from begin

12 Jun 2018, 05:55

i'll try, thanks buddie

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: doodles333, iamMG, Theda and 170 guests