Code: Select all
~1::
KeyWait 1
IfWinActive, World of Warcraft
{
ControlSend,, 1, ahk_id %wowid1%
ControlSend,, 1, ahk_id %wowid2%
ControlSend,, 1, ahk_id %wowid3%
ControlSend,, 1, ahk_id %wowid4%
ControlSend,, 1, ahk_id %wowid5%
Return
}
WinGet, wowid, List, World of Warcraft
~2::
KeyWait 2
IfWinActive, World of Warcraft
{
ControlSend,, 2, ahk_id %wowid1%
ControlSend,, 2, ahk_id %wowid2%
ControlSend,, 2, ahk_id %wowid3%
ControlSend,, 2, ahk_id %wowid4%
ControlSend,, 2, ahk_id %wowid5%
Return
}
WinGet, wowid, List, World of Warcraft
~3::
KeyWait 3
IfWinActive, World of Warcraft
{
ControlSend,, 3, ahk_id %wowid1%
ControlSend,, 3, ahk_id %wowid2%
ControlSend,, 3, ahk_id %wowid3%
ControlSend,, 3, ahk_id %wowid4%
ControlSend,, 3, ahk_id %wowid5%
Return
}
WinGet, wowid, List, World of Warcraft
~4::
KeyWait 4
IfWinActive, World of Warcraft
{
ControlSend,, 4, ahk_id %wowid1%
ControlSend,, 4, ahk_id %wowid2%
ControlSend,, 4, ahk_id %wowid3%
ControlSend,, 4, ahk_id %wowid4%
ControlSend,, 4, ahk_id %wowid5%
Return
}
Code: Select all
ifWinActive World of Warcraft
{
$1::
Loop
{
if not GetKeyState("1", "P")
break
Send 1
sleep 1
}
return
}
ifWinActive World of Warcraft
{
$2::
Loop
{
if not GetKeyState("2", "P")
break
Send 2
sleep 1
}
return
}
ifWinActive World of Warcraft
{
$3::
Loop
{
if not GetKeyState("3", "P")
break
Send 3
sleep 1
}
return
}
ifWinActive World of Warcraft
{
$4::
Loop
{
if not GetKeyState("4", "P")
break
Send 4
sleep 1
}
return
}
Thanks in advance.