Fire mode and Slow walk toggle script for AHK

;=============================================================================================== ; IMPORTANT INFO ABOUT GETTING STARTED: Lines that start with a ; semicolon, such as this one, are comments. They are not executed. ; Any text file whose name ends in .ahk is associated with the program, ; which means that it can be launched simply by double-clicking it. ; You can have as many .ahk files as you want, located in any folder. ; You can also run more than one ahk file simultaneously and each will get its own tray icon. ;=============================================================================================== ; AutoHotkey Version: v1.1.22.03 ; Language: English ; Platform: Win9x/NT/XP/Vista/Win7 ;=============================================================================================== ;--------------------------------------- ; Script Initialization Stuff ;--------------------------------------- #IfWinActive ahk_class fox ;Makes Sure this Script is only active when the game window is active. #NoEnv ;Avoids checking empty variables to see if they are environment variables. #SingleInstance ;Determines whether a script is allowed to run again when it is already running. SendMode Input ;Switches to the SendInput method for Send, SendRaw, Click, and MouseMove/Click/Drag. ;--------------------------------------- ; Erasing variables contents ;--------------------------------------- ToggleWalk := "" SingleShot := "" EscapeDisable := "" ;--------------------------------------- ; Setup key binds ;--------------------------------------- LControl:: ;The chosen key to be toggled. ToggleWalk := !ToggleWalk ;Making the variable toggled by using Logical-not (!). return ;Returns from a subroutine to which execution had previously jumped via function-call, Gosub, Hotkey activation, GroupActivate, or other means. ; LControl up:: ;When the chosen key in its UP state, while ToggleWalk ;and the ToggleWalk variable is True or 1. { ; send {LControl down} ;Keep pushing down on the chosen key. Sleep 30 ;Waits the specified amount of time in milliseconds before continuing. } ; send {LControl up} ;When the chosen key in its UP state, and the TOggleWalk variable is False or 0. Release the chosen key. return ;Returns from a subroutine to which execution had previously jumped via function-call, Gosub, Hotkey activation, GroupActivate, or other means. Rbutton & Lbutton:: ;The chosen button combination SingleShot := GetKeyState("CapsLock", "T") ;Check the Caps Lock key state, 1 or 0 and add the result to the SingleShot variable. ; if SingleShot = 1 ;If the variable is True or 1. { ; Send, {click} ;Send a single left mouseclick } ; else ;If the variable is False or 0. { ; Send {LButton down} ;Keep pushing down on the left mouse button } ; return ;Returns from a subroutine to which execution had previously jumped via function-call, Gosub, Hotkey activation, GroupActivate, or other means. Esc:: ;The chosen button EscapeDisable := GetKeyState("LControl") ;Check the Lcontrol key state, 1 or 0 and add the result to the EscapeDisable variable. ; if EscapeDisable = 0 ;If the variable is False or 0 (Slow walk not on) { ; Send {Esc down} ;Send the ESC button as normal } ; Send {Esc up} ;If the variable is True or 1 (slow walk on), do not send ESC ; return ;Returns from a subroutine to which execution had previously jumped via function-call, Gosub, Hotkey activation, GroupActivate, or other means. XButton2::CapsLock ;Rebind mouse button 5 (Forward button in browser) to Caps Lock CapsLock::return ;Unbind The Capslock Button on the keyboard ;=============================================================================================== ; Please read the QUICK-START TUTORIAL near the top of the help file. ; It explains how to perform common automation tasks such as sending ; keystrokes and mouse clicks. It also explains more about hotkeys. ;===============================================================================================

1. Download the Autohotkey application from http://www.autohotkey.com/ and install it.2. Go to C:\Users\YOUR USERNAME\Documents3. Look for "Autohotkey.ahk" file, rightclick the file and select "edit script"4. Delete all the text in the "Autohotkey.ahk" file and replace it with this:5. Save and close the file6. Doubleclick the "Autohotkey.ahk" file and play the game with fire mode and slow walk toggle!