Log in

View Full Version : Hi! Need some help with AHK



Devyy
10-25-2008, 02:00 PM
Hey! I want to start multiboxing now.
I got a Ahk script by a friend and it worked so far ... but i have some key bindings like Shift+1 or Ctrl+1 and these key bindings wont be send to the other wow.exe just the main char use the skill than. What do i need to change at my script? How would it work?


WinGet, wowid, List, World of Warcraft

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

WinGet, wowid, List, World of Warcraft

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

WinGet, wowid, List, World of Warcraft

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

WinGet, wowid, List, World of Warcraft

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

WinGet, wowid, List, World of Warcraft

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

WinGet, wowid, List, World of Warcraft

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

WinGet, wowid, list, World of Warcraft

7::
KeyWait, 7, D
ControlSend,, {7}, ahk_id %wowid1%
ControlSend,, {7}, ahk_id %wowid2%
ControlSend,, {7}, ahk_id %wowid3%
ControlSend,, {7}, ahk_id %wowid4%
ControlSend,, {7}, ahk_id %wowid5%
Return

WinGet, wowid, list, World of Warcraft

8::
KeyWait, 8, D
ControlSend,, {8}, ahk_id %wowid1%
ControlSend,, {8}, ahk_id %wowid2%
ControlSend,, {8}, ahk_id %wowid3%
ControlSend,, {8}, ahk_id %wowid4%
ControlSend,, {8}, ahk_id %wowid5%
Return

WinGet, wowid, list, World of Warcraft

9::
KeyWait, 9, D
ControlSend,, {9}, ahk_id %wowid1%
ControlSend,, {9}, ahk_id %wowid2%
ControlSend,, {9}, ahk_id %wowid3%
ControlSend,, {9}, ahk_id %wowid4%
ControlSend,, {9}, ahk_id %wowid5%
Return

WinGet, wowid, list, World of Warcraft

0::
KeyWait, 0, D
ControlSend,, {0}, ahk_id %wowid1%
ControlSend,, {0}, ahk_id %wowid2%
ControlSend,, {0}, ahk_id %wowid3%
ControlSend,, {0}, ahk_id %wowid4%
ControlSend,, {0}, ahk_id %wowid5%
Return

WinGet, wowid, List, World of Warcraft

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

WinGet, wowid, list, World of Warcraft

-::
KeyWait, -, D
ControlSend,, {-}, ahk_id %wowid1%
ControlSend,, {-}, ahk_id %wowid2%
ControlSend,, {-}, ahk_id %wowid3%
ControlSend,, {-}, ahk_id %wowid4%
ControlSend,, {-}, ahk_id %wowid5%
Return

WinGet, wowid, list, World of Warcraft

Space::
KeyWait, Space, D
ControlSend,, {Space}, ahk_id %wowid1%
ControlSend,, {Space}, ahk_id %wowid2%
ControlSend,, {Space}, ahk_id %wowid3%
ControlSend,, {Space}, ahk_id %wowid4%
ControlSend,, {Space}, ahk_id %wowid5%
Return

WinGet, wowid, list, World of Warcraft

x::
KeyWait, x, D
ControlSend,, {x}, ahk_id %wowid1%
ControlSend,, {x}, ahk_id %wowid2%
ControlSend,, {x}, ahk_id %wowid3%
ControlSend,, {x}, ahk_id %wowid4%
ControlSend,, {x}, ahk_id %wowid5%
Return

WinGet, wowid, list, World of Warcraft

Tab::
KeyWait, Tab, D
ControlSend,, {Tab}, ahk_id %wowid1%
ControlSend,, {Tab}, ahk_id %wowid2%
ControlSend,, {Tab}, ahk_id %wowid3%
ControlSend,, {Tab}, ahk_id %wowid4%
ControlSend,, {Tab}, ahk_id %wowid5%
Return

WinGet, wowid, list, World of Warcraft

Shift::
KeyWait, Shift, D
ControlSend,, {Shift}, ahk_id %wowid1%
ControlSend,, {Shift}, ahk_id %wowid2%
ControlSend,, {Shift}, ahk_id %wowid3%
ControlSend,, {Shift}, ahk_id %wowid4%
ControlSend,, {Shift}, ahk_id %wowid5%
Return

WinGet, wowid, list, World of Warcraft

NumPad1::
KeyWait, NumPad1, D
ControlSend,, {NumPad1}, ahk_id %wowid1%
ControlSend,, {NumPad1}, ahk_id %wowid2%
ControlSend,, {NumPad1}, ahk_id %wowid3%
ControlSend,, {NumPad1}, ahk_id %wowid4%
ControlSend,, {NumPad1}, ahk_id %wowid5%
Return

WinGet, wowid, list, World of Warcraft

NumPad2::
KeyWait, NumPad2, D
ControlSend,, {NumPad2}, ahk_id %wowid1%
ControlSend,, {NumPad2}, ahk_id %wowid2%
ControlSend,, {NumPad2}, ahk_id %wowid3%
ControlSend,, {NumPad2}, ahk_id %wowid4%
ControlSend,, {NumPad2}, ahk_id %wowid5%
Return

WinGet, wowid, list, World of Warcraft

NumPad3::
KeyWait, NumPad3, D
ControlSend,, {NumPad3}, ahk_id %wowid1%
ControlSend,, {NumPad3}, ahk_id %wowid2%
ControlSend,, {NumPad3}, ahk_id %wowid3%
ControlSend,, {NumPad3}, ahk_id %wowid4%
ControlSend,, {NumPad3}, ahk_id %wowid5%
Return

WinGet, wowid, list, World of Warcraft

NumPad4::
KeyWait, NumPad4, D
ControlSend,, {NumPad4}, ahk_id %wowid1%
ControlSend,, {NumPad4}, ahk_id %wowid2%
ControlSend,, {NumPad4}, ahk_id %wowid3%
ControlSend,, {NumPad4}, ahk_id %wowid4%
ControlSend,, {NumPad4}, ahk_id %wowid5%
Return

WinGet, wowid, list, World of Warcraft

NumPad5::
KeyWait, NumPad5, D
ControlSend,, {NumPad5}, ahk_id %wowid1%
ControlSend,, {NumPad5}, ahk_id %wowid2%
ControlSend,, {NumPad5}, ahk_id %wowid3%
ControlSend,, {NumPad5}, ahk_id %wowid4%
ControlSend,, {NumPad5}, ahk_id %wowid5%
Return

WinGet, wowid, list, World of Warcraft

NumPad6::
KeyWait, NumPad6, D
ControlSend,, {NumPad6}, ahk_id %wowid1%
ControlSend,, {NumPad6}, ahk_id %wowid2%
ControlSend,, {NumPad6}, ahk_id %wowid3%
ControlSend,, {NumPad6}, ahk_id %wowid4%
ControlSend,, {NumPad6}, ahk_id %wowid5%
Return

WinGet, wowid, list, World of Warcraft

NumPad7::
KeyWait, NumPad7, D
ControlSend,, {NumPad7}, ahk_id %wowid1%
ControlSend,, {NumPad7}, ahk_id %wowid2%
ControlSend,, {NumPad7}, ahk_id %wowid3%
ControlSend,, {NumPad7}, ahk_id %wowid4%
ControlSend,, {NumPad7}, ahk_id %wowid5%
Return

WinGet, wowid, list, World of Warcraft

NumPad8::
KeyWait, NumPad8, D
ControlSend,, {NumPad8}, ahk_id %wowid1%
ControlSend,, {NumPad8}, ahk_id %wowid2%
ControlSend,, {NumPad8}, ahk_id %wowid3%
ControlSend,, {NumPad8}, ahk_id %wowid4%
ControlSend,, {NumPad8}, ahk_id %wowid5%
Return

WinGet, wowid, list, World of Warcraft

NumPad9::
KeyWait, NumPad9, D
ControlSend,, {NumPad9}, ahk_id %wowid1%
ControlSend,, {NumPad9}, ahk_id %wowid2%
ControlSend,, {NumPad9}, ahk_id %wowid3%
ControlSend,, {NumPad9}, ahk_id %wowid4%
ControlSend,, {NumPad9}, ahk_id %wowid5%
Return

WinGet, wowid, list, World of Warcraft

y::
KeyWait, LButton, D
ControlSend,, {y}, ahk_id %wowid1%
ControlSend,, {y}, ahk_id %wowid2%
ControlSend,, {y}, ahk_id %wowid3%
ControlSend,, {y}, ahk_id %wowid4%
ControlSend,, {y}, ahk_id %wowid5%
Return

~h::
KeyWait, h, D
#IfWinActive, World of Warcraft
{
ControlSend,, h, ahk_id %wowid1%
ControlSend,, h, ahk_id %wowid2%
ControlSend,, h, ahk_id %wowid3%
ControlSend,, h, ahk_id %wowid4%
ControlSend,, h, ahk_id %wowid5%
}
Return

WinGet, wowid, list, World of Warcraft

Ctrl::
KeyWait, Ctrl, D
ControlSend,, {Ctrl}, ahk_id %wowid1%
ControlSend,, {Ctrl}, ahk_id %wowid2%
ControlSend,, {Ctrl}, ahk_id %wowid3%
ControlSend,, {Ctrl}, ahk_id %wowid4%
ControlSend,, {Ctrl}, ahk_id %wowid5%
Return

WinGet, wowid, list, World of Warcraft

e::
KeyWait, e, D
ControlSend,, {e}, ahk_id %wowid1%
ControlSend,, {e}, ahk_id %wowid2%
ControlSend,, {e}, ahk_id %wowid3%
ControlSend,, {e}, ahk_id %wowid4%
ControlSend,, {e}, ahk_id %wowid5%
Return

WinGet, wowid, list, World of Warcraft

q::
KeyWait, q, D
ControlSend,, {q}, ahk_id %wowid1%
ControlSend,, {q}, ahk_id %wowid2%
ControlSend,, {q}, ahk_id %wowid3%
ControlSend,, {q}, ahk_id %wowid4%
ControlSend,, {q}, ahk_id %wowid5%
Return

WinGet, wowid, list, World of Warcraft

f::
KeyWait, f, D
ControlSend,, {f}, ahk_id %wowid1%
ControlSend,, {f}, ahk_id %wowid2%
ControlSend,, {f}, ahk_id %wowid3%
ControlSend,, {f}, ahk_id %wowid4%
ControlSend,, {f}, ahk_id %wowid5%
Return

WinGet, wowid, list, World of Warcraft

c::
KeyWait, c, D
ControlSend,, {c}, ahk_id %wowid1%
ControlSend,, {c}, ahk_id %wowid2%
ControlSend,, {c}, ahk_id %wowid3%
ControlSend,, {c}, ahk_id %wowid4%
ControlSend,, {c}, ahk_id %wowid5%
Return


Thank you

Devyy

Katharsis
10-25-2008, 02:12 PM
See the Wiki under Example Script Full

http://www.dual-boxing.com/wiki/index.php/AutoHotKey