Log in

View Full Version : AHK Mouseclick



Bloodcrush
05-10-2008, 05:42 AM
Hi guys need some help at Mouseclicks at AHK well my german mates cant help me :D
Well i made a script


#IfWinActive, Leader
LButton::

if MouseInRange(250,269,759,778)
ControlSend,,{3 down}{3 up}, Leader
else if MouseInRange(250,269,759,778)
ControlSend,,{3 down}{3 up}, Box1
else if MouseInRange(250,269,759,778)
ControlSend,,{3 down}{3 up}, Box2

else
Click
return

but then only my Leader cast then and if i wirte this


#IfWinActive, Leader
LButton::

if MouseInRange(250,269,759,778)
ControlSend,,{3 down}{3 up}, Box1
else if MouseInRange(250,269,759,778)
ControlSend,,{3 down}{3 up}, Leader
else if MouseInRange(250,269,759,778)
ControlSend,,{3 down}{3 up}, Box2

else
Click
return

Only the Box1 cast can you help that all cast if i Click in this Range

Sorry for my bad english

Bloodcrush
05-10-2008, 08:10 PM
please guys help me /up

Chorizotarian
05-10-2008, 08:27 PM
I'm not sure what you are trying to do. All of the conditions in your if/then/else are the same. Don't you want to test for MouseInRange using 3 different regions?

Bloodcrush
05-11-2008, 06:35 AM
only in 1 region but if make a normal script like


#IfWinActive, Leader
LButton::

if MouseInRange(250,269,759,778)
ControlSend,,{3 down}{3 up},Leader
ControlSend,,{3 down}{3 up},Box1
ControlSend,,{3 down}{3 up},Box2

else
Click
return

then only the leader cast in this region the box1 und 2 casting in all window range if i click i dont know why

Freddie
05-11-2008, 06:58 AM
Wenn eine IF oder ELSE besitzt mehr als eine Zeile, Du musst { } schreiben.


#IfWinActive, Leader
LButton::

if MouseInRange(250,269,759,778)
{
ControlSend,,{3 down}{3 up},Leader
ControlSend,,{3 down}{3 up},Box1
ControlSend,,{3 down}{3 up},Box2
}

else
Click

return

Bloodcrush
05-11-2008, 01:21 PM
Boah danke funkt wie ne 1 :D

Kennste dich aus mit Mouse4 taste des funkt bei mir irgendwie net mit Xbutton1

Freddie
05-12-2008, 07:29 AM
If I were you I would take things one step at a time to find the problem.

First, without AHK, does Xbutton1 on the mouse trigger Mouse4 in WoW?

Second, with AHK, write a script that sends Xbutton1 to one copy of the game when you press a key. Does it trigger Mouse 4?

Third, with AHK, write a script that sends Xbutton 1 to one copy of the game when you press Xbutton 1. Does it trigger Mouse 4?

Finally, write a script that sends Xbutton 1 to multiple copies of the game when you press Xbutton 1.