 |
AutoHotkey Community Let's help each other out
|
| View previous topic :: View next topic |
| Author |
Message |
elitegunslinger
Joined: 04 Jan 2008 Posts: 3
|
Posted: Fri Jan 04, 2008 5:19 am Post subject: Autohotkey WoW Multibox Help |
|
|
Alright, I have the keyboard mapped out right now. How do I get the mouse to work too? I want to be able to click in the same positions with right and left nothing more.
here is where I am at:
| Code: | killbroadcast = 0
WinGet, wowid, List, World of Warcraft
~Pause::
KeyWait, Pause, D
If(%killbroadcast% = 0)
{
killbroadcast = 1
}
else
{
killbroadcast = 0
WinGet, wowid, List, World of Warcraft
}
Return
~1::
KeyWait 1, D
WinGet, Active_Window, ID, A
IfWinActive, World of Warcraft
{
If(%killbroadcast% = 0)
{
Loop, %wowid%
{
target_window := wowid%A_index%
If (Active_Window <> target_window)
{
ControlSend,, 1, ahk_id %target_window%
}
}
}
}
Return
~2::
KeyWait 2, D
WinGet, Active_Window, ID, A
IfWinActive, World of Warcraft
{
If(%killbroadcast% = 0)
{
Loop, %wowid%
{
target_window := wowid%A_index%
If (Active_Window <> target_window)
{
ControlSend,, 2, ahk_id %target_window%
}
}
}
}
Return
~3::
KeyWait 3, D
WinGet, Active_Window, ID, A
IfWinActive, World of Warcraft
{
If(%killbroadcast% = 0)
{
Loop, %wowid%
{
target_window := wowid%A_index%
If (Active_Window <> target_window)
{
ControlSend,, 3, ahk_id %target_window%
}
}
}
}
Return
~4::
KeyWait 4, D
WinGet, Active_Window, ID, A
IfWinActive, World of Warcraft
{
If(%killbroadcast% = 0)
{
Loop, %wowid%
{
target_window := wowid%A_index%
If (Active_Window <> target_window)
{
ControlSend,, 4, ahk_id %target_window%
}
}
}
}
Return
~5::
KeyWait 5, D
WinGet, Active_Window, ID, A
IfWinActive, World of Warcraft
{
If(%killbroadcast% = 0)
{
Loop, %wowid%
{
target_window := wowid%A_index%
If (Active_Window <> target_window)
{
ControlSend,, 5, ahk_id %target_window%
}
}
}
}
Return
~6::
KeyWait 6, D
WinGet, Active_Window, ID, A
IfWinActive, World of Warcraft
{
If(%killbroadcast% = 0)
{
Loop, %wowid%
{
target_window := wowid%A_index%
If (Active_Window <> target_window)
{
ControlSend,, 6, ahk_id %target_window%
}
}
}
}
Return
~7::
KeyWait 7, D
WinGet, Active_Window, ID, A
IfWinActive, World of Warcraft
{
If(%killbroadcast% = 0)
{
Loop, %wowid%
{
target_window := wowid%A_index%
If (Active_Window <> target_window)
{
ControlSend,, 7, ahk_id %target_window%
}
}
}
}
Return
~8::
KeyWait 8, D
WinGet, Active_Window, ID, A
IfWinActive, World of Warcraft
{
If(%killbroadcast% = 0)
{
Loop, %wowid%
{
target_window := wowid%A_index%
If (Active_Window <> target_window)
{
ControlSend,, 8, ahk_id %target_window%
}
}
}
}
Return
~9::
KeyWait 9, D
WinGet, Active_Window, ID, A
IfWinActive, World of Warcraft
{
If(%killbroadcast% = 0)
{
Loop, %wowid%
{
target_window := wowid%A_index%
If (Active_Window <> target_window)
{
ControlSend,, 9, ahk_id %target_window%
}
}
}
}
Return
~0::
KeyWait 0, D
WinGet, Active_Window, ID, A
IfWinActive, World of Warcraft
{
If(%killbroadcast% = 0)
{
Loop, %wowid%
{
target_window := wowid%A_index%
If (Active_Window <> target_window)
{
ControlSend,, 0, ahk_id %target_window%
}
}
}
}
Return
~-::
KeyWait -, D
WinGet, Active_Window, ID, A
IfWinActive, World of Warcraft
{
If(%killbroadcast% = 0)
{
Loop, %wowid%
{
target_window := wowid%A_index%
If (Active_Window <> target_window)
{
ControlSend,, -, ahk_id %target_window%
}
}
}
}
Return
~=::
KeyWait =, D
WinGet, Active_Window, ID, A
IfWinActive, World of Warcraft
{
If(%killbroadcast% = 0)
{
Loop, %wowid%
{
target_window := wowid%A_index%
If (Active_Window <> target_window)
{
ControlSend,, =, ahk_id %target_window%
}
}
}
}
Return
~F1::
KeyWait F1, D
WinGet, Active_Window, ID, A
IfWinActive, World of Warcraft
{
If(%killbroadcast% = 0)
{
Loop, %wowid%
{
target_window := wowid%A_index%
If (Active_Window <> target_window)
{
ControlSend,, {F1}, ahk_id %target_window%
}
}
}
}
Return
~F2::
KeyWait F2, D
WinGet, Active_Window, ID, A
IfWinActive, World of Warcraft
{
If(%killbroadcast% = 0)
{
Loop, %wowid%
{
target_window := wowid%A_index%
If (Active_Window <> target_window)
{
ControlSend,, {F2}, ahk_id %target_window%
}
}
}
}
Return
~F3::
KeyWait F3, D
WinGet, Active_Window, ID, A
IfWinActive, World of Warcraft
{
If(%killbroadcast% = 0)
{
Loop, %wowid%
{
target_window := wowid%A_index%
If (Active_Window <> target_window)
{
ControlSend,, {F3}, ahk_id %target_window%
}
}
}
}
Return
~F4::
KeyWait F4, D
WinGet, Active_Window, ID, A
IfWinActive, World of Warcraft
{
If(%killbroadcast% = 0)
{
Loop, %wowid%
{
target_window := wowid%A_index%
If (Active_Window <> target_window)
{
ControlSend,, {F4}, ahk_id %target_window%
}
}
}
}
Return
~F5::
KeyWait F5, D
WinGet, Active_Window, ID, A
IfWinActive, World of Warcraft
{
If(%killbroadcast% = 0)
{
Loop, %wowid%
{
target_window := wowid%A_index%
If (Active_Window <> target_window)
{
ControlSend,, {F5}, ahk_id %target_window%
}
}
}
}
Return
~F6::
KeyWait F6, D
WinGet, Active_Window, ID, A
IfWinActive, World of Warcraft
{
If(%killbroadcast% = 0)
{
Loop, %wowid%
{
target_window := wowid%A_index%
If (Active_Window <> target_window)
{
ControlSend,, {F6}, ahk_id %target_window%
}
}
}
}
Return
~F7::
KeyWait F7, D
WinGet, Active_Window, ID, A
IfWinActive, World of Warcraft
{
If(%killbroadcast% = 0)
{
Loop, %wowid%
{
target_window := wowid%A_index%
If (Active_Window <> target_window)
{
ControlSend,, {F7}, ahk_id %target_window%
}
}
}
}
Return
~F8::
KeyWait F8, D
WinGet, Active_Window, ID, A
IfWinActive, World of Warcraft
{
If(%killbroadcast% = 0)
{
Loop, %wowid%
{
target_window := wowid%A_index%
If (Active_Window <> target_window)
{
ControlSend,, {F8}, ahk_id %target_window%
}
}
}
}
Return
~F9::
KeyWait F9, D
WinGet, Active_Window, ID, A
IfWinActive, World of Warcraft
{
If(%killbroadcast% = 0)
{
Loop, %wowid%
{
target_window := wowid%A_index%
If (Active_Window <> target_window)
{
ControlSend,, {F9}, ahk_id %target_window%
}
}
}
}
Return
~F10::
KeyWait F10, D
WinGet, Active_Window, ID, A
IfWinActive, World of Warcraft
{
If(%killbroadcast% = 0)
{
Loop, %wowid%
{
target_window := wowid%A_index%
If (Active_Window <> target_window)
{
ControlSend,, {F10}, ahk_id %target_window%
}
}
}
}
Return
~F11::
KeyWait F11, D
WinGet, Active_Window, ID, A
IfWinActive, World of Warcraft
{
If(%killbroadcast% = 0)
{
Loop, %wowid%
{
target_window := wowid%A_index%
If (Active_Window <> target_window)
{
ControlSend,, {F11}, ahk_id %target_window%
}
}
}
}
Return
~F12::
KeyWait F12, D
WinGet, Active_Window, ID, A
IfWinActive, World of Warcraft
{
If(%killbroadcast% = 0)
{
Loop, %wowid%
{
target_window := wowid%A_index%
If (Active_Window <> target_window)
{
ControlSend,, {F12}, ahk_id %target_window%
}
}
}
}
Return
;~a::
;KeyWait a, D
;WinGet, Active_Window, ID, A
;IfWinActive, World of Warcraft
;{
; If(%killbroadcast% = 0)
; {
; Loop, %wowid%
; {
; target_window := wowid%A_index%
; If (Active_Window <> target_window)
; {
; ControlSend,, a, ahk_id %target_window%
; }
; }
; }
;}
;Return
~b::
KeyWait b, D
WinGet, Active_Window, ID, A
IfWinActive, World of Warcraft
{
If(%killbroadcast% = 0)
{
Loop, %wowid%
{
target_window := wowid%A_index%
If (Active_Window <> target_window)
{
ControlSend,, b, ahk_id %target_window%
}
}
}
}
Return
~c::
KeyWait c, D
WinGet, Active_Window, ID, A
IfWinActive, World of Warcraft
{
If(%killbroadcast% = 0)
{
Loop, %wowid%
{
target_window := wowid%A_index%
If (Active_Window <> target_window)
{
ControlSend,, c, ahk_id %target_window%
}
}
}
}
Return
;~d::
;KeyWait d, D
;WinGet, Active_Window, ID, A
;IfWinActive, World of Warcraft
;{
; If(%killbroadcast% = 0)
; {
; Loop, %wowid%
; {
; target_window := wowid%A_index%
; If (Active_Window <> target_window)
; {
; ControlSend,, d, ahk_id %target_window%
; }
; }
; }
;}
;Return
;~e::
;KeyWait e, D
;WinGet, Active_Window, ID, A
;IfWinActive, World of Warcraft
;{
; If(%killbroadcast% = 0)
; {
; Loop, %wowid%
; {
; target_window := wowid%A_index%
; If (Active_Window <> target_window)
; {
; ControlSend,, e, ahk_id %target_window%
; }
; }
; }
;}
;Return
~f::
KeyWait f, D
WinGet, Active_Window, ID, A
IfWinActive, World of Warcraft
{
If(%killbroadcast% = 0)
{
Loop, %wowid%
{
target_window := wowid%A_index%
If (Active_Window <> target_window)
{
ControlSend,, f, ahk_id %target_window%
}
}
}
}
Return
~g::
KeyWait g, D
WinGet, Active_Window, ID, A
IfWinActive, World of Warcraft
{
If(%killbroadcast% = 0)
{
Loop, %wowid%
{
target_window := wowid%A_index%
If (Active_Window <> target_window)
{
ControlSend,, g, ahk_id %target_window%
}
}
}
}
Return
~h::
KeyWait h, D
WinGet, Active_Window, ID, A
IfWinActive, World of Warcraft
{
If(%killbroadcast% = 0)
{
Loop, %wowid%
{
target_window := wowid%A_index%
If (Active_Window <> target_window)
{
ControlSend,, h, ahk_id %target_window%
}
}
}
}
Return
~i::
KeyWait i, D
WinGet, Active_Window, ID, A
IfWinActive, World of Warcraft
{
If(%killbroadcast% = 0)
{
Loop, %wowid%
{
target_window := wowid%A_index%
If (Active_Window <> target_window)
{
ControlSend,, i, ahk_id %target_window%
}
}
}
}
Return
~j::
KeyWait j, D
WinGet, Active_Window, ID, A
IfWinActive, World of Warcraft
{
If(%killbroadcast% = 0)
{
Loop, %wowid%
{
target_window := wowid%A_index%
If (Active_Window <> target_window)
{
ControlSend,, j, ahk_id %target_window%
}
}
}
}
Return
~k::
KeyWait k, D
WinGet, Active_Window, ID, A
IfWinActive, World of Warcraft
{
If(%killbroadcast% = 0)
{
Loop, %wowid%
{
target_window := wowid%A_index%
If (Active_Window <> target_window)
{
ControlSend,, k, ahk_id %target_window%
}
}
}
}
Return
~l::
KeyWait l, D
WinGet, Active_Window, ID, A
IfWinActive, World of Warcraft
{
If(%killbroadcast% = 0)
{
Loop, %wowid%
{
target_window := wowid%A_index%
If (Active_Window <> target_window)
{
ControlSend,, l, ahk_id %target_window%
}
}
}
}
Return
~m::
KeyWait m, D
WinGet, Active_Window, ID, A
IfWinActive, World of Warcraft
{
If(%killbroadcast% = 0)
{
Loop, %wowid%
{
target_window := wowid%A_index%
If (Active_Window <> target_window)
{
ControlSend,, m, ahk_id %target_window%
}
}
}
}
Return
~n::
KeyWait n, D
WinGet, Active_Window, ID, A
IfWinActive, World of Warcraft
{
If(%killbroadcast% = 0)
{
Loop, %wowid%
{
target_window := wowid%A_index%
If (Active_Window <> target_window)
{
ControlSend,, n, ahk_id %target_window%
}
}
}
}
Return
~o::
KeyWait o, D
WinGet, Active_Window, ID, A
IfWinActive, World of Warcraft
{
If(%killbroadcast% = 0)
{
Loop, %wowid%
{
target_window := wowid%A_index%
If (Active_Window <> target_window)
{
ControlSend,, o, ahk_id %target_window%
}
}
}
}
Return
~p::
KeyWait p, D
WinGet, Active_Window, ID, A
IfWinActive, World of Warcraft
{
If(%killbroadcast% = 0)
{
Loop, %wowid%
{
target_window := wowid%A_index%
If (Active_Window <> target_window)
{
ControlSend,, p, ahk_id %target_window%
}
}
}
}
Return
;~q::
;KeyWait q, D
;WinGet, Active_Window, ID, A
;IfWinActive, World of Warcraft
;{
; If(%killbroadcast% = 0)
; {
; Loop, %wowid%
; {
; target_window := wowid%A_index%
; If (Active_Window <> target_window)
; {
; ControlSend,, q, ahk_id %target_window%
; }
; }
; }
;}
;Return
~r::
KeyWait r, D
WinGet, Active_Window, ID, A
IfWinActive, World of Warcraft
{
If(%killbroadcast% = 0)
{
Loop, %wowid%
{
target_window := wowid%A_index%
If (Active_Window <> target_window)
{
ControlSend,, r, ahk_id %target_window%
}
}
}
}
Return
;~s::
;KeyWait s, D
;WinGet, Active_Window, ID, A
;IfWinActive, World of Warcraft
;{
; If(%killbroadcast% = 0)
; {
; Loop, %wowid%
; {
; target_window := wowid%A_index%
; If (Active_Window <> target_window)
; {
; ControlSend,, s, ahk_id %target_window%
; }
; }
; }
;}
;Return
~t::
KeyWait t, D
WinGet, Active_Window, ID, A
IfWinActive, World of Warcraft
{
If(%killbroadcast% = 0)
{
Loop, %wowid%
{
target_window := wowid%A_index%
If (Active_Window <> target_window)
{
ControlSend,, t, ahk_id %target_window%
}
}
}
}
Return
~u::
KeyWait u, D
WinGet, Active_Window, ID, A
IfWinActive, World of Warcraft
{
If(%killbroadcast% = 0)
{
Loop, %wowid%
{
target_window := wowid%A_index%
If (Active_Window <> target_window)
{
ControlSend,, u, ahk_id %target_window%
}
}
}
}
Return
~v::
KeyWait v, D
WinGet, Active_Window, ID, A
IfWinActive, World of Warcraft
{
If(%killbroadcast% = 0)
{
Loop, %wowid%
{
target_window := wowid%A_index%
If (Active_Window <> target_window)
{
ControlSend,, v, ahk_id %target_window%
}
}
}
}
Return
;~w::
;KeyWait w, D
;WinGet, Active_Window, ID, A
;IfWinActive, World of Warcraft
;{
; If(%killbroadcast% = 0)
; {
; Loop, %wowid%
; {
; target_window := wowid%A_index%
; If (Active_Window <> target_window)
; {
; ControlSend,, w, ahk_id %target_window%
; }
; }
; }
;}
;Return
~x::
KeyWait x, D
WinGet, Active_Window, ID, A
IfWinActive, World of Warcraft
{
If(%killbroadcast% = 0)
{
Loop, %wowid%
{
target_window := wowid%A_index%
If (Active_Window <> target_window)
{
ControlSend,, x, ahk_id %target_window%
}
}
}
}
Return
~y::
KeyWait y, D
WinGet, Active_Window, ID, A
IfWinActive, World of Warcraft
{
If(%killbroadcast% = 0)
{
Loop, %wowid%
{
target_window := wowid%A_index%
If (Active_Window <> target_window)
{
ControlSend,, y, ahk_id %target_window%
}
}
}
}
Return
~z::
KeyWait z, D
WinGet, Active_Window, ID, A
IfWinActive, World of Warcraft
{
If(%killbroadcast% = 0)
{
Loop, %wowid%
{
target_window := wowid%A_index%
If (Active_Window <> target_window)
{
ControlSend,, z, ahk_id %target_window%
}
}
}
}
Return
~Space::
KeyWait Space, D
WinGet, Active_Window, ID, A
IfWinActive, World of Warcraft
{
If(%killbroadcast% = 0)
{
Loop, %wowid%
{
target_window := wowid%A_index%
If (Active_Window <> target_window)
{
ControlSend,, {Space}, ahk_id %target_window%
}
}
}
}
Return
~/::
KeyWait /, D
WinGet, Active_Window, ID, A
IfWinActive, World of Warcraft
{
If(%killbroadcast% = 0)
{
killbroadcast=1
}
}
Return
~Enter::
KeyWait Enter, D
WinGet, Active_Window, ID, A
IfWinActive, World of Warcraft
{
If(%killbroadcast% <> 0)
{
killbroadcast = 0
}
else
{
killbroadcast = 1
}
}
Return
~NumpadEnter::
KeyWait NumpadEnter, D
WinGet, Active_Window, ID, A
IfWinActive, World of Warcraft
{
If(%killbroadcast% <> 0)
{
killbroadcast = 0
}
else
{
killbroadcast = 1
}
}
Return
~Backspace::
KeyWait Backspace, D
WinGet, Active_Window, ID, A
IfWinActive, World of Warcraft
{
If(%killbroadcast% = 0)
{
Loop, %wowid%
{
target_window := wowid%A_index%
If (Active_Window <> target_window)
{
ControlSend,, {Backspace}, ahk_id %target_window%
}
}
}
}
Return
|
Now if I could have some aid in refining this:
| Code: | ; This script will click in 2 windows
; could be useful for AOE targetting
; use CTRL and Right Click to select the 2nd window
; use CTRL+ALT and left or right click to click in the window
^!LButton::
coordmode, mouse, relative
MouseGetPos, xpos, ypos, id, control
Winactivate, ahk_id %target%
Click, %xpos%, %ypos%, 1
MouseGetPos, xpos, ypos, dummy, control
Winactivate, ahk_id %id%
Click, %xpos%, %ypos%, 1
return
^!RButton::
coordmode, mouse, relative
MouseGetPos, xpos, ypos, id, control
Winactivate, ahk_id %target%
Click, %xpos%, %ypos%, 1, Right
MouseGetPos, xpos, ypos, dummy, control
Winactivate, ahk_id %id%
Click, %xpos%, %ypos%, 1, Right
return
^RButton::
MouseGetPos, xpos, ypos, target, control
SplashTextOn, 325, , Assigned target window %target%.
Sleep, 2000
SplasHtextoff
return
^q::
MouseGetPos, xpos, ypos, target, control
return
^!p::
Pause
return
^!r::
Reload
return |
or even:
| Code: | #IfWinActive World of Warcraft
~LButton:: ; ~ means don't block
CoordMode, Mouse, Relative ; this is the default, but just in case
MouseGetPos, x, y
ControlClick, X%x% Y%y%, ahk_id %wowid2%
ControlClick, X%x% Y%y%, ahk_id %wowid3%
return
#IfWinActive World of Warcraft
~RButton:: ; ~ means don't block
CoordMode, Mouse, Relative ; this is the default, but just in case
MouseGetPos, x, y
ControlClick, X%x% Y%y%, ahk_id %wowid2%,, R
ControlClick, X%x% Y%y%, ahk_id %wowid3%,, R
return |
|
|
| Back to top |
|
 |
elitegunslinger
Joined: 04 Jan 2008 Posts: 3
|
Posted: Fri Jan 04, 2008 6:08 pm Post subject: |
|
|
| bump? |
|
| Back to top |
|
 |
freeforlife Guest
|
Posted: Wed Jan 30, 2008 9:59 am Post subject: |
|
|
This works, but is too clunky to be reliable.
| Code: |
#IfWinActive, World of Warcraft
~MButton::
{
MouseGetPos xpos,ypos
SetControlDelay -1
ControlClick,xpos ypos, ahk_id %idClone%, , LEFT, 1, NA
}
|
In my case, I have to open both windows, let the priest cast a spell on me (for some reason she has to 'prime it'), tab to the main window, Mid click the corresponding hotbar icon that's set up. Now my mouse cursor will jump back down to the tab and the spell won't fire. Sounds great so far, huh?
Well when I mid click the same spell again, it will fire over and over without fail. However if I want to use another spell it seems I have to click it just right, hold it down just so long before a different spell will cast. Or again tab over and 'prime' the priest spell by casting a different spell.
This is frustrating the **** out of me..
Anyway, try the SetControlDelay -1 in your code and let us know if it's any better for you.
I don't know if I even want to post this.. But I will.
Cheers.
Kev |
|
| Back to top |
|
 |
Guest
|
Posted: Fri Jan 16, 2009 2:43 pm Post subject: |
|
|
| Somewhat new to this program, i copied the script into a new folder (mb.ahk). How do i get this prgram to work in wow? |
|
| Back to top |
|
 |
Milan Guest
|
Posted: Wed Feb 24, 2010 1:30 am Post subject: Key's |
|
|
| Why I cant set key's for moving on W.S.A.D ??? |
|
| Back to top |
|
 |
Elesar
Joined: 28 Jun 2007 Posts: 622 Location: Somewhere around 35 12N 101 49W
|
Posted: Wed Feb 24, 2010 4:02 am Post subject: |
|
|
You very well could with some simple techniques, but, as a multi-boxer, I can say that you don't want to.
It is much more simple and reliable to pass a hotkey to all the instances of the game that fires off an in-game macro.
If you attempt to pass WASD to all clients, your toons will inevitably end up running in lots of different directions.
For more information on multi-boxing, and some very refined scripts or other solutions, visit dual-boxing.com |
|
| Back to top |
|
 |
|
|
You can post new topics in this forum You can reply to topics in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|