A bit complicated :D Topic is solved

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
User avatar
Reloaded
Posts: 283
Joined: 25 Aug 2017, 08:48

A bit complicated :D

18 Aug 2019, 10:06

Hii

i found a way to make my work easier but i dont get it how to program it.
That's what i got but its doesnt work and isn't finished.

Code: Select all

; if i press w than r in a time of 5 sec than i spam w else nothing

cd := 5 ; 5 sec
pressed := true ; when i press its get "pressed"

KeyWait, w, D ; wait for pressing w

if (pressed == true) { ; count to 5
	cd -= 1
	sleep, 1000 
	
	if (cd == 0) { ; if 0 (5 sec) waited pressed get false and we start again
		Msgbox, 5 seconds over
		pressed := false
	}
	
}
The first line is the description what the program should do, but if it's not enough..

If i press W and than R in a period of 5 sec it's (the program) immediately have to spam W for some seconds.
And if i press W and after 5 seconds R the program should do nothing.

if someone would help me i would be verrrrryyyyyy happpppppyyy :D
User avatar
flyingDman
Posts: 2832
Joined: 29 Sep 2013, 19:01

Re: A bit complicated :D  Topic is solved

18 Aug 2019, 13:01

Would something like this work?:

Code: Select all

~w::
input,oVar,L1T5
sendinput, % oVar = "r" ? "wwwwwwwwwwwwwwwwwwwww" : oVar
return
14.3 & 1.3.7
User avatar
Reloaded
Posts: 283
Joined: 25 Aug 2017, 08:48

Re: A bit complicated :D

18 Aug 2019, 14:25

flyingDman wrote:
18 Aug 2019, 13:01
Would something like this work?:

Code: Select all

~w::
input,oVar,L1T5
sendinput, % oVar = "r" ? "wwwwwwwwwwwwwwwwwwwww" : oVar
return
Its working really!! :dance:

Thannnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnkss :D:D:D:D:

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: PAT06, RaptorX and 85 guests