Evolve run script Topic is solved

Ask gaming related questions (AHK v1.1 and older)
Cakes
Posts: 23
Joined: 23 Apr 2018, 09:56

Evolve run script

23 Apr 2018, 10:04

Hey,

I'm looking for some help. I'm trying to make toggle run available in evolve. I have it working but I want the toggle to be off when I press S (Back). I haven't had any luck. I was able to get the W (Forward) key to turn the toggle off but not back. Also, sometimes I have to presss mouse 4 twice before it starts to run. I was wondering if there is any way to fix that.

Code: Select all

#IfWinActive ahk_exe Evolve.exe
*XButton1:: 
     KeyDown := !KeyDown
     If KeyDown
	Send {W down}
     Else
	Send {W up}
Return
~W::KeyDown:=0
#IfWinActive
Rohwedder
Posts: 7623
Joined: 04 Jun 2014, 08:33
Location: Germany

Re: Evolve run script

23 Apr 2018, 10:57

Hallo,
try using lowercase letter Hotkeys:

Code: Select all

#IfWinActive ahk_exe Evolve.exe
*XButton1::
	KeyDown := !KeyDown
	If KeyDown
		Send {w down}
	Else
		Send {w up}
Return
~w::KeyDown:=0
*s::Suspend ;Suspend Hotkeys on/off
#IfWinActive
Cakes
Posts: 23
Joined: 23 Apr 2018, 09:56

Re: Evolve run script

23 Apr 2018, 11:21

Rohwedder wrote:Hallo,
try using lowercase letter Hotkeys:

Code: Select all

#IfWinActive ahk_exe Evolve.exe
*XButton1::
	KeyDown := !KeyDown
	If KeyDown
		Send {w down}
	Else
		Send {w up}
Return
~w::KeyDown:=0
*s::Suspend ;Suspend Hotkeys on/off
#IfWinActive
Thank you for such a quick reply. This does indeed stop the toggle but I want the key to perform the default function of s which is move backward as well.

If I change the code to the following, it does go backwards but doesn't toggle the script off. Would you know how to write that part?

Code: Select all

#IfWinActive ahk_exe Evolve.exe
*XButton1::
	KeyDown := !KeyDown
	If KeyDown
		Send {w down}
	Else
		Send {w up}
Return
~w::KeyDown:=0
~s::KeyDown:=0
#IfWinActive
Cakes
Posts: 23
Joined: 23 Apr 2018, 09:56

Re: Evolve run script  Topic is solved

23 Apr 2018, 12:25

Got it. It's ugly but works as I wanted haha

Code: Select all

#IfWinActive ahk_exe Evolve.exe
XButton1::
	KeyDown := !KeyDown
	If KeyDown
		Send {w down}
	Else
		Send {w up}
Return
~w::KeyDown:=0
~s::
	KeyDown:=0
	If KeyDown
		Send {w down}
	Else
		Send {w up}
Return
#IfWinActive
Cakes
Posts: 23
Joined: 23 Apr 2018, 09:56

Re: Evolve run script

15 May 2018, 06:38

I made a few improvements to prevent toggle getting out of sync.

Code: Select all

#IfWinActive ahk_exe Evolve.exe
;Toggle run on
XButton1::
	if !GetKeyState("w") 
		Send {w down}
return
;Secondary jump
XButton2::
	Send {Space down}
	KeyWait, Xbutton2
	Send {Space up}
return
;Toggle run off
~s::
	if GetKeyState("w")
		Send {w up}
return
#IfWinActive

Return to “Gaming Help (v1)”

Who is online

Users browsing this forum: No registered users and 46 guests