PDA

View Full Version : [AutoHotKey] Totally new, this is what I wanna do.



Feyd
11-26-2009, 09:54 PM
I've searched around. This all looks like a foreign language to me. What I want to do is simple.

My action bar goes 1 - 9. I only want to use 1 - 5. So I put the appropriate skills for my lead char in 1 - 5, and the appropriate skills for my slave in 1 - 5.

I don't mind making both chars eat manually, or making the slave follow manually. All I want to do is when I press space, both characters jump, and when I press 1 - 5, they both perform that skill.

And before you flame me, yes, I've done searches. The concept is just too abstract for me.

thinus
11-26-2009, 10:14 PM
I copied and pasted the sample script on the WIKI and just deleted all the keys you don't want and slimmed it down to only 2 WoWs.


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

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

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

;*** Special Functions ***

; *** Jump ***
~Space::ClonesPush("{Space down}")
~Space Up::ClonesPush("{Space up}")

; *******************
; *** Hotbars 1-5 ***
; *******************
~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}")



PS: It *is* a foreign language ;)

Note that you will manually have to target on both of them or make an assist macro and bind it on one of the 1-5 keys. Or make macros on the alt that just cast on the main's target automatically.


EDIT: Removed the automatic '=' press that was in there for auto assist.

EDIT2: Replaced the space bar broadcasting with something that will work while swimming and flying.

wowphreak
11-28-2009, 10:54 PM
change the clonepush to



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

this will work for any number of wow's