Log in

View Full Version : AutoHotKey trouble.



Zantos
11-03-2009, 04:49 AM
oooook, so i just started to try to dual box for the first time. I downloaded AHK and read the entire wiki about it (http://www.dual-boxing.com/wiki/index.php/AutoHotKey). Being somewhat confused i started to tackle it by meself. I tried to just copy that example script that seemed like it had everything i needed. Just the real basic stuff. (Only dual boxing two druids to 60...for now lol). So i opened my two copes of WoW, and ran the script. It kinda worked... I had WoW on both of my monitors in windowed mode and i was able to get them to jump at the same time, and sorta use their spells together. When they did that tho, if i were to press hotkey 1, in the second window it would press hotkey 1, AND hotkey =. Cant seem to figure it out, Anyone have any advice or even a script that i can just use?

Ualaa
11-03-2009, 05:04 AM
I've never used AHK, so might not be a lot of help.

If you press 2, will it only press 2 on the other screen, or does it do something else too?
If its only a single press, compare what is different from the 1 key settings and the 2 key settings.

In the mean time, you could have nothing on the = key.
And then at least be able to play until someone who knows more can help.

FrozenPol
11-03-2009, 07:52 AM
First post, ive been lurking here for a little while now.........
The person who done the wiki script has = as a target closest enemy bind in warcraft. its basically pushing 2 button for every button you press which is against the tos i think

Here is what i usefor my 4 charachters

ClonesPush(strKeys)
{
global WowWinId1
global WowWinId2
global WowWinId3
global WowWinId4
IfWinNotActive, ahk_id %WowWinId1%
ControlSend, , %strKeys%, ahk_id %WowWinId1%
IfWinNotActive, ahk_id %WowWinId2%
ControlSend, , %strKeys%, ahk_id %WowWinId2%
IfWinNotActive, ahk_id %WowWinId3%
ControlSend, , %strKeys%, ahk_id %WowWinId3%
IfWinNotActive, ahk_id %WowWinId4%
ControlSend, , %strKeys%, ahk_id %WowWinId4%
}

;Grab unique window ID's
WinGet, WowWinId, List, World of Warcraft

; *******************************
; *** Only if WoW is in focus ***
; *******************************
#IfWinActive, World of Warcraft

;*** Special Functions ******************************************

;*** Makes clones jump with main ***
;*** old jump *** ~Space::ClonesPush("{Space down}{Space up}")
~Space::ClonesPush("{Space down}")
~Space Up::ClonesPush("{Space up}")

;*** Team Follow ***
~z::ClonesPush("{z down}{z up}")

;*** Team Formation ***
~h::ClonesPush("{h down}")
~h Up::ClonesPush("{h up}")

;*** Team Assist ***
~Tab::ClonesPush("{Tab down}{Tab up}")

; *** Move clones ***********************************************
Up::ClonesPush("{Up down}")
Up Up::ClonesPush("{Up up}")
Down::ClonesPush("{Down down}")
Down Up::ClonesPush("{Down up}")
Left::ClonesPush("{Left down}")
Left Up::ClonesPush("{Left up}")
Right::ClonesPush("{Right down}")
Right Up::ClonesPush("{Right up}")

; *** Suspends HotKeys while typing on main *********************
~Enter::Suspend, Toggle
~/::Suspend, On
~Escape::Suspend, Off
;~r::Suspend, On


; ************************************************** *************
; *** Hotbars 1-0 ***********************************************
; ************************************************** *************
~1::ClonesPush("{1 down}{1 up}")
~2::ClonesPush("{2 down}{2 up}")
~3::ClonesPush("{3 down}{3 up}")
~4::ClonesPush("{4 down}{4 up}")
~5::ClonesPush("{5 down}{5 up}")
~6::ClonesPush("{6 down}{6 up}")
~7::ClonesPush("{7 down}{7 up}")
~8::ClonesPush("{8 down}{8 up}")
~9::ClonesPush("{9 down}{9 up}")
~0::ClonesPush("{0 down}{0 up}")

; ************************************************** *************
; *** Random KeyBinds ***************************************
; ************************************************** *************
~q::ClonesPush("{q down}{q up}")
~e::ClonesPush("{e down}{e up}")
~r::ClonesPush("{r down}{r up}")
~n::ClonesPush("{n down}{n up}")
~x::ClonesPush("{x down}{x up}")
~c::ClonesPush("{c down}{c up}")
~b::ClonesPush("{b down}{b up}")
~f::ClonesPush("{f down}{f up}")
~g::ClonesPush("{g down}{g up}")
~t::ClonesPush("{t down}{t up}")

hope this helps.

olipcs
11-03-2009, 09:51 AM
a short comment:
I can't help you with AHK, but if you might want to try out HKN (which is also a free, script-based, solution) there a some guides, examples and people who could help you here....

Zantos
11-03-2009, 02:29 PM
a short comment:
I can't help you with AHK, but if you might want to try out HKN (which is also a free, script-based, solution) there a some guides, examples and people who could help you here....

Is HKN an easier tool to use then AHK? Like i said, dont need anything elaborate, just very simple to do two characters.


@FrozenPol > Thanks a ton, when i get back from work tonight ill try that one, I'll let ya know how it goes.

Boss
11-03-2009, 04:43 PM
Never used AHK so can't say if HKN is easier but I will say there are a lot of scripts floating around for it. ones already done for 2clients on one box and what not. Also Freddie(the maker of HKN) is always lurking around to help out and a few others.

Zantos
11-03-2009, 05:05 PM
Alright cool thanks ill try to DL HKN tonight and give it a shot

wowphreak
11-03-2009, 09:55 PM
You can change clonepush to this


clonepush(strkey)
{
global winid
Loop %winid%
{
tmp:=winid%A_Index%
IfWinNotActive, ahk_id %tmp%
ControlSend, ,%strkey%, ahk_id %tmp%
}
}
just change "winid" to whatever yeh use in
WinGet, WowWinId, List, World of Warcraft
the bold part needs to be the same

It'll work for any amount of wows

here another piece that yeh might find intersting




;*****************
; spread out
;*****************

move(strkey)
{
; group of 5 one will stay stationary while the rest move around
global winid
move1="{a %strkey%}{w %strkey%}"
move2="{d %strkey%}{w %strkey%}"
move3="{a %strkey%}{s %strkey%}"
move4="{d %strkey%}{s %strkey%}"

tmp1:=0
loop %winid%
{
ifwinactive % "Ahk_ID " winid%A_Index%
continue
tmp1++
tmp:=windid%A_Index%
key:=move%tmp1%
ControlSend, ,%key%, ahk_id %A_Index%
}
}

~\::
move("UP")
KeyWait \
move("DOWN")
return

A really simple setup would be


clonepush(strkey)
{
global winid
Loop %winid%
{
tmp:=winid%A_Index%
IfWinNotActive, ahk_id %tmp%
ControlSend, ,%strkey%, ahk_id %tmp%
}
}

WinGet, winid, List, World of Warcraft

#IfWinActive, World of Warcraft
; *******************
; *** Hotbars 1-0 ***
; *******************
~1::clonepush("{1 down}{1 up}")
~2::clonepush("{2 down}{2 up}")
~3::clonepush("{3 down}{3 up}")
~4::clonepush("{4 down}{4 up}")
~5::clonepush("{5 down}{5 up}")
~6::clonepush("{6 down}{6 up}")
~7::clonepush("{7 down}{7 up}")
~8::clonepush("{8 down}{8 up}")
~9::clonepush("{9 down}{9 up}")
~0::clonepush("{0 down}{0 up}")
~-::clonepush("{- down}{- up}")
~=::clonepush("{= down}{= up}")