Does anyone have a script for buttons 0 thru 5 on the numpad? I am looking for one that stops firing when i release the buttons. I found one a few years back but when i tried to use it it no longer worked. Thanks in advance.
;Custom script made by nakoomba
;////////////////////////////////////////////////////////////////
#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.
;////////////////////////////////////////////////////////////////
$numpad5:: ;$ prevents the hotkey from triggering itself by Send {a} below in the loop
freq:=100 ;delay between key presses
ifWinActive World of Warcraft ;Check if scrolllock is toggled on, if it is then do the keyspam loop
{
Loop
{
if getkeystate(“numpad5”,“P”)=0 ;Check if {numpad5} is pressed, if not then break loop
break
Send {numpad5} ;key1
Sleep %freq% ;delay
}
}
else ;if isnt toggled on, button to have its native function
Send {numpad5}
return
$numpad1:: ;$ prevents the hotkey from triggering itself by Send {a} below in the loop
freq:=100 ;delay between key presses
ifWinActive World of Warcraft ;Check if scrolllock is toggled on, if it is then do the keyspam loop
{
Loop
{
if getkeystate(“numpad1”,“P”)=0 ;Check if {numpad1} is pressed, if not then break loop
break
Send {numpad1} ;key1
Sleep %freq% ;delay
}
}
else ;if isnt toggled on, button to have its native function
Send {numpad1}
return
$numpad4:: ;$ prevents the hotkey from triggering itself by Send {a} below in the loop
freq:=100 ;delay between key presses
ifWinActive World of Warcraft ;Check if scrolllock is toggled on, if it is then do the keyspam loop
{
Loop
{
if getkeystate(“numpad4”,“P”)=0 ;Check if {numpad1} is pressed, if not then break loop
break
Send {numpad4} ;key1
Sleep %freq% ;delay
}
}
else ;if isnt toggled on, button to have its native function
Send {numpad4}
return
$numpad6:: ;$ prevents the hotkey from triggering itself by Send {a} below in the loop
freq:=100 ;delay between key presses
ifWinActive World of Warcraft ;Check if scrolllock is toggled on, if it is then do the keyspam loop
{
Loop
{
if getkeystate(“numpad6”,“P”)=0 ;Check if {numpad1} is pressed, if not then break loop
break
Send {numpad6} ;key1
Sleep %freq% ;delay
}
}
else ;if isnt toggled on, button to have its native function
Send {numpad6}
return
$numpad7:: ;$ prevents the hotkey from triggering itself by Send {a} below in the loop
freq:=100 ;delay between key presses
ifWinActive World of Warcraft ;Check if scrolllock is toggled on, if it is then do the keyspam loop
{
Loop
{
if getkeystate(“numpad7”,“P”)=0 ;Check if {numpad1} is pressed, if not then break loop
break
Send {numpad7} ;key1
Sleep %freq% ;delay
}
}
else ;if isnt toggled on, button to have its native function
Send {numpad7}
return
$numpad8:: ;$ prevents the hotkey from triggering itself by Send {a} below in the loop
freq:=100 ;delay between key presses
ifWinActive World of Warcraft ;Check if scrolllock is toggled on, if it is then do the keyspam loop
{
Loop
{
if getkeystate(“numpad8”,“P”)=0 ;Check if {numpad1} is pressed, if not then break loop
break
Send {numpad8} ;key1
Sleep %freq% ;delay
}
}
else ;if isnt toggled on, button to have its native function
Send {numpad8}
return
$numpad9:: ;$ prevents the hotkey from triggering itself by Send {a} below in the loop
freq:=100 ;delay between key presses
ifWinActive World of Warcraft ;Check if scrolllock is toggled on, if it is then do the keyspam loop
{
Loop
{
if getkeystate(“numpad9”,“P”)=0 ;Check if {numpad1} is pressed, if not then break loop
break
Send {numpad9} ;key1
Sleep %freq% ;delay
}
}
else ;if isnt toggled on, button to have its native function
Send {numpad9}
return
$numpad2:: ;$ prevents the hotkey from triggering itself by Send {a} below in the loop
freq:=100 ;delay between key presses
ifWinActive World of Warcraft ;Check if scrolllock is toggled on, if it is then do the keyspam loop
{
Loop
{
if getkeystate(“numpad2”,“P”)=0 ;Check if {numpad1} is pressed, if not then break loop
break
Send {numpad1} ;key2
Sleep %freq% ;delay
}
}
else ;if isnt toggled on, button to have its native function
Send {numpad2}
return
$numpad3:: ;$ prevents the hotkey from triggering itself by Send {a} below in the loop
freq:=100 ;delay between key presses
ifWinActive World of Warcraft ;Check if scrolllock is toggled on, if it is then do the keyspam loop
{
Loop
{
if getkeystate(“numpad3”,“P”)=0 ;Check if {numpad3} is pressed, if not then break loop
break
Send {numpad3} ;key1
Sleep %freq% ;delay
}
}
else ;if isnt toggled on, button to have its native function
Send {numpad3}
return
$NumpadDot:: ;$ prevents the hotkey from triggering itself by Send {a} below in the loop
freq:=100 ;delay between key presses
ifWinActive World of Warcraft ;Check if scrolllock is toggled on, if it is then do the keyspam loop
{
Loop
{
if getkeystate(“NumpadDot”,“P”)=0 ;Check if {NumpadDot} is pressed, if not then break loop
break
Send {NumpadDot} ;key1
Sleep %freq% ;delay
}
}
else ;if isnt toggled on, button to have its native function
Send {NumpadDot}
return
$NumpadAdd:: ;$ prevents the hotkey from triggering itself by Send {a} below in the loop
freq:=100 ;delay between key presses
ifWinActive World of Warcraft ;Check if scrolllock is toggled on, if it is then do the keyspam loop
{
Loop
{
if getkeystate(“NumpadAdd”,“P”)=0 ;Check if {NumpadAdd} is pressed, if not then break loop
break
Send {NumpadAdd} ;key1
Sleep %freq% ;delay
}
}
else ;if isnt toggled on, button to have its native function
Send {NumpadAdd}
return
$NumpadSub:: ;$ prevents the hotkey from triggering itself by Send {a} below in the loop
freq:=100 ;delay between key presses
ifWinActive World of Warcraft ;Check if scrolllock is toggled on, if it is then do the keyspam loop
{
Loop
{
if getkeystate(“NumpadSub”,“P”)=0 ;Check if {NumpadSub} is pressed, if not then break loop
break
Send {NumpadSub} ;key1
Sleep %freq% ;delay
}
}
else ;if isnt toggled on, button to have its native function
Send {NumpadSub}
return
$NumpadDiv:: ;$ prevents the hotkey from triggering itself by Send {a} below in the loop
freq:=100 ;delay between key presses
ifWinActive World of Warcraft ;Check if scrolllock is toggled on, if it is then do the keyspam loop
{
Loop
{
if getkeystate(“NumpadDiv”,“P”)=0 ;Check if {NumpadDiv} is pressed, if not then break loop
break
Send {NumpadDiv} ;key1
Sleep %freq% ;delay
}
}
else ;if isnt toggled on, button to have its native function
Send {NumpadDiv}
return
$NumpadMult:: ;$ prevents the hotkey from triggering itself by Send {a} below in the loop
freq:=100 ;delay between key presses
ifWinActive World of Warcraft ;Check if scrolllock is toggled on, if it is then do the keyspam loop
{
Loop
{
if getkeystate(“NumpadMult”,“P”)=0 ;Check if {NumpadMult} is pressed, if not then break loop
break
Send {NumpadMult} ;key1
Sleep %freq% ;delay
}
}
else ;if isnt toggled on, button to have its native function
Send {NumpadMult}
return
Thanks for the script but i have 1 question. How do I make it stop? I pressed a key on numpad and it fired the way it was supposed to but when i released the button it kept firing. I had to go to my desktop and suspend the script to get it to stop. I am a complete novice to this whole script thing so forgive me in advance.
how do I copy a macro to auotkey and get it to work I can’t get it to run
you just push the button again and it stop
I tried that and it just keeps running. I had to alt tab out of game and pause the script to get it to stop running.