AutoHotkey Homepage AutoHotkey Community
Let's help each other out
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

when i run autohotkey my buttons dont work??

 
Reply to topic    AutoHotkey Community Forum Index -> Ask for Help
View previous topic :: View next topic  
Author Message
neoko
Guest





PostPosted: Tue Jan 19, 2010 4:43 am    Post subject: when i run autohotkey my buttons dont work?? Reply with quote

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
Back to top
GuestC
Guest





PostPosted: Tue Jan 19, 2010 9:14 am    Post subject: Reply with quote

Try with the returns outside the parentheses
Back to top
neoko
Guest





PostPosted: Wed Jan 20, 2010 2:23 am    Post subject: Reply with quote

still didnt work
Back to top
Elesar



Joined: 28 Jun 2007
Posts: 622
Location: Somewhere around 35 12N 101 49W

PostPosted: Wed Jan 20, 2010 7:55 am    Post subject: Reply with quote

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)
Back to top
View user's profile Send private message
neoko
Guest





PostPosted: Fri Jan 22, 2010 1:12 am    Post subject: Reply with quote

WTF!!!!!!!!!!!!!!!! Still dont work
Back to top
wow addict
Guest





PostPosted: Fri Jan 22, 2010 11:53 am    Post subject: please help Reply with quote

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}")

Back to top
wow addict
Guest





PostPosted: Fri Jan 22, 2010 12:21 pm    Post subject: Re: please help Reply with quote

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
Back to top
wow addict
Guest





PostPosted: Fri Jan 22, 2010 1:24 pm    Post subject: Re: please help Reply with quote

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?
Back to top
wow addict
Guest





PostPosted: Fri Jan 22, 2010 7:25 pm    Post subject: Re: please help Reply with quote

its me again i found unicode solution Very Happy all you need is another version of AHK program you can found it here Arrow http://www.autohotkey.com/forum/topic50485.html&highlight=unicode

BUT i still dont know how to do mouse commands with modifiers sending to inactive window (buttons and wheel)
Back to top
Display posts from previous:   
Reply to topic    AutoHotkey Community Forum Index -> Ask for Help All times are GMT
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum


Powered by phpBB © 2001, 2005 phpBB Group