Mouseclick issue!

Ask gaming related questions (AHK v1.1 and older)
Stagonas
Posts: 6
Joined: 10 Apr 2017, 11:03

Mouseclick issue!

16 May 2017, 17:44

Hello there,

I am trying to use a simple "move to coordinates and left click" script but I cannot get it to work as intended.
The weird thing is that the macro used to work in the past and that is without me changing anything!
The purpose of the macro is to open the game menu (esc) and click on a button located on specific coordinates.
What actually happens is the menu appears, the cursor moves to the coordinates but the click seems to not execute (details below)

Without further ado, here is the macro

F1::
BlockInput On
SendInput {Esc}
MouseClick, left, 962, 432,, fast
BlockInput Off
return

Now, for a few extra details, I am using a few more macros that work perfectly but other than the above mentioned one
none handles mouse clicks.
While doing some testing I discovered that if I strip the macro to just

F1::
MouseClick, left, 962, 432,, fast
return

and open the game menu manually, the first execution of the macro seems to still fail handling the left click. BUT, when I run it a
second time without moving the mouse (while the cursor is on the correct coordinates due the the previous execution) the intended
button is clicked.

This little experiment makes me think that the mouse click is actually executed before moving to the given coordinates!

Does any have any idea what could be going wrong?
neomulemi6
Posts: 216
Joined: 30 Jun 2016, 06:01

Re: Mouseclick issue!

16 May 2017, 20:13

Can you tell me if this works?

Code: Select all

F1::
Click Down 962, 432
Sleep 500
Click Up 962, 432
Return
Stagonas
Posts: 6
Joined: 10 Apr 2017, 11:03

Re: Mouseclick issue!

16 May 2017, 20:50

neomulemi6 wrote:Can you tell me if this works?

Code: Select all

F1::
Click Down 962, 432
Sleep 500
Click Up 962, 432
Return
I just tried it and unfortunately it doesn't.
neomulemi6
Posts: 216
Joined: 30 Jun 2016, 06:01

Re: Mouseclick issue!

16 May 2017, 22:38

How about this?

Code: Select all

F1::
Send {Click 962, 432}
Return
or this

Code: Select all

F1::
Click 962, 432 0
Sleep 500
Click 962, 432
Return
Stagonas
Posts: 6
Joined: 10 Apr 2017, 11:03

Re: Mouseclick issue!

17 May 2017, 17:08

Both behave the same as the previous attempts.
The second one clicks the button on the second click.
Maybe something like the code below works too but I would like the click to happen almost instantly,
plus I am really curious about the reason the original block of code is not working any more!!!

Code: Select all

F1::
MouseMove, 962, 432, 0
Sleep 500
Click
return
Stagonas
Posts: 6
Joined: 10 Apr 2017, 11:03

Re: Mouseclick issue!

20 May 2017, 10:48

By the way if anyone thinks they can help but need more info feel free to ask and I will try to answer.
3600
Posts: 16
Joined: 20 May 2017, 11:42

Re: Mouseclick issue!

21 May 2017, 08:09

the game detect the click is from a machine its too fast
Stagonas
Posts: 6
Joined: 10 Apr 2017, 11:03

Re: Mouseclick issue!

21 May 2017, 09:54

3600 wrote:the game detect the click is from a machine its too fast
Could you elaborate some more if possible?
3600
Posts: 16
Joined: 20 May 2017, 11:42

Re: Mouseclick issue!

21 May 2017, 10:27

i need help myself....some game detect / block zero delay action

until now i used X-mouse(some games block zero delay there too) but its not good enough to create BOT, so i am here to try AHK

Return to “Gaming Help (v1)”

Who is online

Users browsing this forum: jameswrightesq and 117 guests