View Full Version : Help-AHK

01-02-2008, 05:52 PM
#IfWinActive, World of Warcraft
ControlSend,,{` down}, ahk_id %idMain%
ControlSend,,{= down}, ahk_id %idClone%
ControlSend,,{` down}, ahk_id %idClone%

#IfWinActive, World of Warcraft
~` up::
ControlSend,,{` up}, ahk_id %idMain%
ControlSend,,{= up}, ahk_id %idClone%
ControlSend,,{` up}, ahk_id %idClone%

I setup the (`)key to cast (ex.mount),but only the main char works for just 0.001 second and stop casting immediately,the colne doesn't active...
only this key script has problem,the others all work fine.
Please tell me where's wrong.
thanks and forgive my poor English XD

01-03-2008, 01:58 AM
first, remove the middle line with the = key in it; that's a default from Sorn's script that only he uses; = is his "Assist" macro hotkey, he wrote the script so it would assist on every press, you don't need it lol

Second, if that doesn't fix it, try the ofllowing:
[code:1]#IfWinActive, World of Warcraft
ControlSend,,{` down}{` up}, ahk_id %idMain%
ControlSend,,{` down}{` up}, ahk_id %idClone%

01-04-2008, 10:43 AM
The main is working because you have ~ infront of the hotkey, this passes the hotkey through to your active window.

The easiest way to test this is to open the chat entry box on both clients and hit the hot key... if only one ' appears on the main then you know the hotkey isn't really working on your main either... it is doing the action because it was passed through the hotkey polling.

It is a shame Sorn's script is so widely used... there are much better examples on these forums without the redundant #WinActive instructions and which are much more efficient.

01-04-2008, 10:46 AM
The #WinActive bit is necessary for some of us who're multi-taskers, particularly IRC and instant messengers, or web surfing while playing ;p Long as it's not lagging the response time to keypresses I don't care either lol

01-04-2008, 11:03 AM
it is only needed at the top of the script... all lines below the directive have that directive applied to them. Try it you will see what I mean :)

If it is there don't bother removing it but it really isn't necesary, I imagine there is no significant impact once the script is in memory.