Log in

View Full Version : [WoW] [AHK] Using Modifiers Shift and Control combined with number key --- not working



smorcodio
03-20-2018, 11:54 AM
Hi, my question is: how can I make, for example, Shift 5, be duplicated to all toons? I use AHK to multibox and it works fine for all keybinds from 1 to 0 and any alphabetical key, but adding a modifier doesn't work at all. When I press Shift 5 it only works on the main toon, but it doesnt get sent to the clones.

My script is:

~5::
KeyWait 5
IfWinActive, World of Warcraft
{
ControlSend,, 5, ahk_id %wowid2%
ControlSend,, 5, ahk_id %wowid3%
ControlSend,, 5, ahk_id %wowid4%
ControlSend,, 5, ahk_id %wowid5%
Return
}

And I use this script to use shift

~LShift::
KeyWait, LShift, L
IfWinActive, World of Warcraft
{
ControlSend,, {LShift}, ahk_id %wowid2%
ControlSend,, {LShift}, ahk_id %wowid3%
ControlSend,, {LShift}, ahk_id %wowid4%
ControlSend,, {LShift}, ahk_id %wowid5%
Return
}

I figured this would send Shift to all toons, and I think it does. But maybe it doesn't allow character combinations? As in, it's only sending Shift while I'm holding it down and ignores the "5" key press?

I've also tried variations of ~+5 to no avail.

MiRai
03-29-2018, 12:13 PM
I just want to chime in here and say that you aren't being ignored because we're a bunch of jerks, but rather that there aren't many AHK users who peruse these forums all that often. However, I would imagine that there are a handful of AHK threads that can be found from searching on this forum, some of which probably include sample scripts and what not. Otherwise, you may have to just wait and/or ask over on the AHK forum.

Teel
07-05-2018, 12:06 PM
I apologize for the necro, but in case anyone comes across this looking for something similar...

In AHK, when you Send a key, you're in effect sending a {%key% Down} followed quickly by {%key% Up}. When broadcasting movement keys or modifiers, you need to break the key DOWN and the key UP into separate hotkeys to capture the duration. For OP's macro:

~LShift Down::
IfWinActive, World of Warcraft
{
ControlSend,, {LShift Down}, ahk_id %wowid2%
ControlSend,, {LShift Down}, ahk_id %wowid3%
ControlSend,, {LShift Down}, ahk_id %wowid4%
ControlSend,, {LShift Down}, ahk_id %wowid5%
Return
}

~LShift Up::
IfWinActive, World of Warcraft
{
ControlSend,, {LShift Up}, ahk_id %wowid2%
ControlSend,, {LShift Up}, ahk_id %wowid3%
ControlSend,, {LShift Up}, ahk_id %wowid4%
ControlSend,, {LShift Up}, ahk_id %wowid5%
Return
}


There are a couple things that could've gone wrong a ~+5 hotkey, but at a guess - if you were expecting Shift 5 to be broadcast you would've needed to send {Shift Down}5{Shift Up}