I have a logitech g510 keyboard with all the macro keys on the left hand side which is very inconvenient for me. I prefer to use my numpad to cast spells and such. I found an AHK script that i think will work for me but it has a toggle on and off button in the script. Is there a way to make the script stop firing once i release the buttons? I just downloaded AHK so im a total noob in writing scripts for it. Any help will be greatly appreciated. Here is the script below
; Simple key spam script by Winsane @ ownedcore.
; Toggle on and off with numlock.
~NumLock::Suspend, Toggle
*Numpad1::
Loop
{
GetKeyState, state, Numpad1, p
if state = U
break
; Otherwise:
Send, {Numpad1}
Sleep, 25
}
*Numpad2::
Loop
{
GetKeyState, state, Numpad2, p
if state = U
break
; Otherwise:
Send, {Numpad2}
Sleep, 25
}
*Numpad3::
Loop
{
GetKeyState, state, Numpad3, p
if state = U
break
; Otherwise:
Send, {Numpad3}
Sleep, 25
}
*Numpad4::
Loop
{
GetKeyState, state, Numpad4, p
if state = U
break
; Otherwise:
Send, {F5}{F6}{F7}{F8}{F9}{F10}{4}
Sleep, 25
}
*Numpad5::
Loop
{
GetKeyState, state, Numpad5, p
if state = U
break
; Otherwise:
Send, {Numpad5}
Sleep, 25
}
*Numpad6::
Loop
{
GetKeyState, state, Numpad6, p
if state = U
break
; Otherwise:
Send, {Numpad6}{F4}{F11}{F12}
Sleep, 25
}
*Numpad7::
Loop
{
GetKeyState, state, Numpad7, p
if state = U
break
; Otherwise:
Send, {Numpad7}
Sleep, 25
}
*Numpad8::
Loop
{
GetKeyState, state, Numpad8, p
if state = U
break
; Otherwise:
Send, {Numpad8}
Sleep, 25
}
*Numpad9::
Loop
{
GetKeyState, state, Numpad9, p
if state = U
break
; Otherwise:
Send, {Numpad9}
Sleep, 25
}
*Numpad0::
Loop
{
GetKeyState, state, Numpad0, p
if state = U
break
; Otherwise:
Send, {Numpad0}
Sleep, 25
}