Hey, can someone tell me why this wont work? I dint make it. Someone gave it to me. (I will be starting to learn AHK Scriting from this weekend. But untill then.. I would love to be able to play Tomb Raider. Could some please help?
#SingleInstance Force #NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases. ;#Warn ; Recommended for catching common errors. SendMode Input ; Recommended for new scripts due to its superior speed and reliability. SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory. $X:: ;$ prevents the hotkey from triggering itself by Send {x} below in the loop freq:=30 ;delay between key presses if getkeystate(“ScrollLock”,”T”) ;Check if scrolllock is toggled on, if it is then do the keyspam loop { Loop { if getkeystate(“X”,”P”)=0 ;Check if {x} is pressed, if not then break loop break Send {e} ; Sleep %freq% ; Send {e} ; Sleep %freq% Send {e} Sleep %freq% Send {e} } } else ;if scroll lock isnt toggled on, then press “x”, for “x” button to have its normal function Send {x} return $v:: ;$ prevents the hotkey from triggering itself by Send {v} below in the loop freq:=30 ;delay between key presses if getkeystate(“ScrollLock”,”T”) ;Check if scrolllock is toggled on, if it is then do the keyspam loop { Loop { if getkeystate(“v”,”P”)=0 ;Check if {v} is pressed, if not then break loop break Send {Left} ; Sleep %freq% ; Send {Right} ; Sleep %freq% Send {Left} Sleep %freq% Send {Right} } } else ;if scroll lock isnt toggled on, then press “v”, for “v” button to have its normal function Send {v} return
Thank You !