Hello, Ive been trying to add the CapsLock key to my Autohotkey script that allows me to repeatedly send the same action until I let the key go (similar to the Logitech G13? and WoW Keyboards). 1,2,3,4,5 work correctly but I can't get CapsLock to work with similar code and I am not very savvy with Autohotkey. Can anyone help me out? Thanks ahead of time for anyone that replys.
#ifWinActive World of Warcraft
{
$1::
Loop
{
if not GetKeyState("1", "P")
break
Send 1
sleep 1
}
return
$2::
Loop
{
if not GetKeyState("2", "P")
break
Send 2
sleep 1
}
return
$3::
Loop
{
if not GetKeyState("3", "P")
break
Send 3
sleep 1
}
return
$4::
Loop
{
if not GetKeyState("4", "P")
break
Send 4
sleep 1
}
return
$5::
Loop
{
if not GetKeyState("5", "P")
break
Send 5
sleep 1
}
return
CapsLock:: ;this is where I start to have problems
Loop
{
GetKeyState("CapsLock", "P")
if state=D
break
Send {CapsLock}
sleep 1
}
return
}
- - - Updated - - -
Sorry, the formatting didn't go through, at the end where CapsLock:: starts is where I start having problems with this script.