AutoHotkey Community

It is currently May 27th, 2012, 1:51 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 9 posts ] 
Author Message
PostPosted: January 19th, 2010, 5:43 am 
i have
~2::
KeyWait 2
IfWinActive, World of Warcraft
{
ControlSend,, 2, ahk_id %wowid1%
ControlSend,, 2, ahk_id %wowid2%
Return
}

~3::
KeyWait 3
IfWinActive, World of Warcraft
{
ControlSend,, 3, ahk_id %wowid1%
ControlSend,, 3, ahk_id %wowid2%
Return
}
4::
keywait 4
IfWinActive, world of warcraft
{
controlsend,, 4, ank_id %wowid1%
controlsend,, 4, ank_id %wowid2%
return
}

5::
keywait 6
IfWinActive, world of warcraft
{
controlsend,, 5, ank_id %wowid1%
controlsend,, 5, ank_id %wowid2%
return
}

6::
keywait 6
IfWinActive, world of warcraft
{
controlsend,, 6, ank_id %wowid1%
controlsend,, 6, ank_id %wowid2%
return
}

7::
keywait 7
IfWinActive, world of warcraft
{
controlsend,, 7, ank_id %wowid1%
controlsend,, 7, ank_id %wowid2%
return
}

8::
keywait 8
IfWinActive, world of warcraft
{
controlsend,, 8, ank_id %wowid1%
controlsend,, 8, ank_id %wowid2%
return
}

9::
keywait 9
IfWinActive, world of warcraft
{
controlsend,, 9, ank_id %wowid1%
controlsend,, 9, ank_id %wowid2%
return
}

0::
keywait 0
IfWinActive, world of warcraft
{
controlsend,, 0, ank_id %wowid1%
controlsend,, 0, ank_id %wowid2%
return
}

-::
keywait -
IfWinActive, world of warcraft
{
controlsend,, -, ank_id %wowid1%
controlsend,, -, ank_id %wowid2%
return
}

=::
keywait =
IfWinActive, world of warcraft
{
controlsend,, =, ank_id %wowid1%
controlsend,, =, ank_id %wowid2%
return
}

h::
keywait h
IfWinActive, world of warcraft
{
controlsend,, h, ank_id %wowid1%
controlsend,, h, ank_id %wowid2%
return
}



in there plz help


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: January 19th, 2010, 10:14 am 
Try with the returns outside the parentheses


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: January 20th, 2010, 3:23 am 
still didnt work


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: January 20th, 2010, 8:55 am 
Offline

Joined: June 28th, 2007, 1:08 am
Posts: 662
Ah, the joys of multi-boxing....

If this is your entire script, you are missing some vital parts.

This part gets retrieves the process IDs of your WoW clients:
Code:
WinGet, wowid, List, World of Warcraft


The code you have should work if you add that line at the top of the file.
If you want a more powerful script that is much shorter and easier to add keys and more clients to, try this one by [VxE]:
Code:
   ; Generic multiboxing script, by [VxE].
   ; To use:
   ; First, open all of the windows that you're going to be using.
   ; Then use the hotkey [Win]+[PgUp] to activate the script.
   ; You may deactivate the script at any time using the hotkey [win]+[PgDn].
   ; Make sure to double-check your window title! It is case sensitive.
WindowTitle = World of Warcraft
   ; Define hotkeys to use for multiboxing.
   ; Undefined keys will behave normally.
Hotkeys = ; a list of names of keyboard keys
(
   2
   3
   4
   5
   6
   7
   8
   9
   0
   -
   =
   h
)

#UseHook
#Persistent
SetKeyDelay, -1
SetBatchLines, -1
Hotkey, IfWinActive, %WindowTitle%
Hotkey, #PgUp, Toggle, on
Hotkey, #PgDn, Toggle, on
return
Toggle:
onoff := (A_ThisHotkey = "#PgUp") ? "on" : "off"
WinGet, id, List, %WindowTitle%
Hotkey, IfWinActive, %WindowTitle%
Loop, Parse, Hotkeys, `n, `r%A_Space%%A_Tab%
{
   IfInString, A_LoopField, Button, Continue
   IfInString, A_LoopField, Wheel, Continue
   Hotkey, %A_LoopField%, HandleKeys, %onoff%
   Hotkey, %A_LoopField% Up, HandleKeys, %onoff%
}
return

HandleKeys:
thk := StripModifiers(A_ThisHotkey)
updown := InStr(A_ThisHotkey, " Up") ? " up}" : " down}"
Loop, %id%
ControlSend,, {blind}{%thk%%updown%, % "ahk_id " id%A_Index%
return

StripModifiers(keyname) {
   Loop, Parse, keyname, %A_Space%, ~!#$^&*+<>
      return A_LoopField
}


That will work regardless if you have 2, 3, or more clients running, and you could theoretically map out your entire keyboard/mouse and it would still be shorter than your original script for two clients and 12 keys.

For more help with setup see dual-boxing.com
Their wiki has an AHK section with pre-made multi-boxing scripts and tons of other useful information for those of us that have a split internet personality. (I don't currently box, but I have been known to play up to 5 accounts of various games at times, namely WoW and Vanguard)


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: January 22nd, 2010, 2:12 am 
WTF!!!!!!!!!!!!!!!! Still dont work


Report this post
Top
  
Reply with quote  
 Post subject: please help
PostPosted: January 22nd, 2010, 12:53 pm 
First of all I wanna apologize for my bad english. Its not my native language.

i think its becasue you use another keyboard than english...for example you use slovak or czech keyboard but program think you use english so if you wanna send for example "1" you have to push "shift-1"
if you want to work without shift you have to put keys from your slovak keyboard
so:
1 would be +
2 would be ľ
3 would be š
4 would be č
5 would be ť
etc

but if you want to save it it will tell you that ANSI dont know this symbols so you have to uste Unicode but if you try to start scritp it wil give you error and program wouldnt start

I have the same problem. Still dont know how to solve it. I tryed remap it like this: č::4 but it just dont work. I donkt know why because i am relative a noob in this program. Maybe somebody else who use this program longer than me could help us.

My script look like this:
Code:
#IfWinActive, World of Warcraft
WinGet, WowWinId, List, World of Warcraft

ClonesPush(strKeys)
{
   global WowWinId1
   global WowWinId2
   global WowWinId3
   global WowWinId4
   global WowWinId5
   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%
   IfWinNotActive, ahk_id %WowWinId5%
      ControlSend, , %strKeys%, ahk_id %WowWinId5%
}

Pause::Pause  ; toogle pause

; stop script while you use chat enter toogle escape turn off
~Enter::Suspend, Toggle
~Escape::Suspend, Off

; jump funkcion
~Space::ClonesPush("{Space down}{Space up}")

; movement work but its not all right becasue it will send for example w and than stop it...thats all right but i wanna make it to work like this: you push "w" and it will continue send "w" command until i stop it (put my finger out of keyboard) - all the time while i am holding "w" button
~w::ClonesPush("{w down}{w up}")
~s::ClonesPush("{s down}{s up}")
~a::ClonesPush("{a down}{a up}")
~d::ClonesPush("{d down}{d up}")

; action bars - working
~e::ClonesPush("{e down}{e up}")
~q::ClonesPush("{q down}{q up}")
~f::ClonesPush("{f down}{f up}")
~r::ClonesPush("{r down}{r up}")
~t::ClonesPush("{t down}{t up}")
~c::ClonesPush("{c down}{c up}")
~v::ClonesPush("{v down}{v up}")
~x::ClonesPush("{x down}{x up}")
~h::ClonesPush("{h down}{h up}")
~b::ClonesPush("{b down}{b up}")
~g::ClonesPush("{g down}{g up}")
~F1::ClonesPush("{F1 down}{F1 up}")
~F2::ClonesPush("{F2 down}{F2 up}")
~F3::ClonesPush("{F3 down}{F3 up}")




; action bars which dont work
~+::ClonesPush("{+ down}{+ up}")
~l::ClonesPush("{l down}{l up}")
~š::ClonesPush("{š down}{š up}")
~c::ClonesPush("{c down}{c up}")
~t::ClonesPush("{t down}{t up}")

; have to be shift+q and shift+e
~+q::ClonesPush("{+q down}{+q up}")
~+e::ClonesPush("{+e down}{+e up}")



Report this post
Top
  
Reply with quote  
 Post subject: Re: please help
PostPosted: January 22nd, 2010, 1:21 pm 
i wanted to edit my post but i cannot probably because i am guest...
anyway i solve one of my problems and it have to be like this:


Code:
; have to be shift+q and shift+e
~+q::ClonesPush("{Shift down}{q down}{q up}{Shift up}")
~+e::ClonesPush("{Shift down}{e down}{e up}{Shift up}")


hope this help somebody :wink:


Report this post
Top
  
Reply with quote  
 Post subject: Re: please help
PostPosted: January 22nd, 2010, 2:24 pm 
sorry its me again...i was wondering if anybody know how to make combo with modifiers and mouse...
for example:
hold down shift/ctrl and than mouse wheel up/down
hold down shift/ctrl and than mouse click left/right and others multi mouse buttons like 3(middle) 4 (side) 5 (side 2) etc

of course sending this to inactive window for multibox (in addition to my script above)

i trying to make it but its still dont work, is it possible? can anybody tell me how please?


Report this post
Top
  
Reply with quote  
 Post subject: Re: please help
PostPosted: January 22nd, 2010, 8:25 pm 
its me again i found unicode solution :D all you need is another version of AHK program you can found it here :arrow: http://www.autohotkey.com/forum/topic50 ... ht=unicode

BUT i still dont know how to do mouse commands with modifiers sending to inactive window (buttons and wheel)


Report this post
Top
  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 9 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: Apollo, engunneer, JSLover, sjc1000, Yahoo [Bot] and 19 guests


You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Group