Log in

View Full Version : AutoHotKey doesn't work



Multimoni
11-14-2007, 11:33 AM
Hi !
I'm quite sure nobody have wrote about this problem, so I made a new topic.
I use autohotkey since my third computer is being repaired, but it's seems like my scripts doesn't work, because pressing Z ( azerty ftw! ) make my main go forward, but make my reroll stand straigh and go forward like doing a thousand tiny steps instead of going forward running like my main do.
I tried :
WinGet, wowid, List, World of Warcraft
~Z::
KeyWait, Z, D
#IfWinActive, World of Warcraft
{
ControlSend,, Z, ahk_id %wowid1%
ControlSend,, Z, ahk_id %wowid2%
}
Return


then :
WinGet, wowid, List, World of Warcraft
#IfWinActive, World of Warcraft
~Z::
ControlSend,,{Z down}{Z up}, ahk_id %wowid1%
ControlSend,,{Z down}{Z up}, ahk_id %wowid2%
return


but same result for both : not what I had expected.

Anyone have a solution ?
Thanks all for your answers.

Multimoni, http://multimoni.blogspot.com/

PS: sorry for my bad english, I drop school years before :X

Djarid
11-14-2007, 12:09 PM
Multi, in fact this has been mentioned quite a few times

the way to get around it is to have key:: and Key UP:: settings

eg.

[code:1]z::
ControlSend,,{z down} ahk_id %wowid1%
ControlSend,,{z down} ahk_id %wowid2%
return

z up::
ControlSend,,{z up} ahk_id %wowid1%
ControlSend,,{z up} ahk_id %wowid2%
return[/code:1]

Multimoni
11-14-2007, 12:35 PM
Thank a lot Djarid !
So now I have :
[code:1]WinGet, wowid, List, World of Warcraft
~z::
#IfWinActive, World of Warcraft
{
ControlSend,,{z down}, ahk_id %wowid1%
ControlSend,,{z down}, ahk_id %wowid2%
}
return
~z up::
#IfWinActive, World of Warcraft

{
ControlSend,,{z up}, ahk_id %wowid1%
ControlSend,,{z up}, ahk_id %wowid2%
}
return
[/code:1]
and it work just perfect.
Is there any reason for us not to use down AND up settings for every key, even 1, 2, 3 basicaly used to cast spells ?

Thanks again,

Multimoni.

Djarid
11-15-2007, 03:50 AM
You only need to split the keypress and release for keys that you want to do stuff while you hold it down.

if you don't split them, it is sending a quick keypress at the keyboard repeat rate.

For normal actions a quick keypress is all that is required and so there is no mileage in splitting the key down and up stages.

BTW.. you only need one #ifwinactive statement in your script as it applies to everything below that statement, should save some typing

Multimoni
11-15-2007, 02:26 PM
Now, even if the Q, Z, S and D work fine, there is still something that make my clones unable to do EXACTLY what does the main do. When I turn left, they all do, but then there is a tiny difference between my caracters and after 3 ou 4 turns they don't even go in the same direction. I think the fact that typing "A" write "aa" on my the main windows when it write "a" on the others. Have I done anything wrong in the script ?
Thank for the answer :)

Multimoni

Djarid
11-16-2007, 03:49 AM
Ok first off... even with hardware multiboxing, you can't control all your characters with the keyboard... you must use /follow or they will very quickly diverge.

as for the double character send... get rid of the ~ before your hotkeys

~ means send this key to the focussed window as well as doing the defined action.

so

[code:1]~z::
#IfWinActive, World of Warcraft
{
ControlSend,,{z down}, ahk_id %wowid1%
ControlSend,,{z down}, ahk_id %wowid2%
} [/code:1]

lets z go to your active WoW

then sends z to both instances.... not good

replace it with (no ~)

[code:1]z::
#IfWinActive, World of Warcraft
{
ControlSend,,{z down}, ahk_id %wowid1%
ControlSend,,{z down}, ahk_id %wowid2%
} [/code:1]

Multimoni
11-16-2007, 04:08 PM
It doesn't work better this way, I guess there is another thing I don't understand :)
By the way, now I aware that I'll never be able to do the exact same thing with three characters. But I still want to try multiboxing three rogues twink.
Am I the only one who ever tried that ?
I mean, backstab is very hard to use with that combinaison, but cheapshot will be easier, right ?
I'm uping two rogues since yesterday, and I'm every second more determinate to make this team.

Thank for all yours answers and advices by the way!

Moni,
Multimoni.blogspot.com