PDA

View Full Version : [AutoHotKey] trying to write a code for mouse click



DroidFighter
10-01-2012, 11:37 AM
Hello, just started learning ahk and found out not much tutorials exist on the web about it. Anyway I'm trying to write a code that will connect between 2 windows so if I click with the mouse in 1 game window it will click in the other game window in the same place aswel (same for left and right mouse click)

Been trying to work with both those codes but it got messy and nothing worked and I'm not even sure I'm doing the right thing here.


KeyWait, LButton, D
~LButton::
ControlSend,, {LButton}, ahk_id %active_id%
Return


MouseGetPos xpos, ypos
Click::ControlSend, , {MouseClick, left, xpos, ypos}, ahk_pid %active_id%


Would be glad to get some assistance to get my project running.
Thanks in advance.

aasi888
10-01-2012, 06:42 PM
Similar: http://www.dual-boxing.com/threads/47954-Mouse-Button-4-and-5-Cloning-using-AutoHotKey (http://www.dual-boxing.com/threads/47954-Mouse-Button-4-and-5-Cloning-using-AutoHotKey)

I haven't found a way to broadcast mouseclicks reliably with AHK. It seems that I have to press multiple times to get a click through. I would post my script if it were any usefull. However it causes more pain that is helpfull. You could do most clicking of the different windows by using macros. Write "/fstack" in wow chat and hit enter. the the see button codes for each button. Once you get the name of the butotn you can make macros e.g.
/click "ButtonNameHereCaseSensitive"


If you MUST get clicks through then I suggest trying Hotkeynet or ISboxer.

Ualaa
10-01-2012, 08:49 PM
You could use what IS Boxer calls a "Repeater Region", and set it up for free with HKN.
Hot Key Net is free...

You can use HKN in conjunction with AHK.
But if HKN will do what you want, while AHK will not...
Why not move to HKN?

Anyway, here's how to do a Repeater Region with HKN: http://www.dual-boxing.com/threads/32741-HOW-TO-Earthquake/page2

Cptan
10-01-2012, 11:40 PM
http://www.dual-boxing.com/threads/46887-AutoHotKey-and-quot-Healing-Rain-quot-WoW-spell

Note the use of coordmode function.

It was mentioned in AHK forum that ControlClick is a better approach. However I didn't use it as my current method works for me. Not ideal, but it didn't fail me when I 10 boxed raid. If you get it to work, please share.

BTW, if you are comfortable with scripts, and want to continue this path, choose the 64-bit version of AHK and WOW client. As a minimalist, I am a very happy user of them.