Jump to content

Get coords of a mouse click


Arkie
 Share

Recommended Posts

I'm working on a script an I need to read and store mouse coordinates exactly when the next left click is performed. The only function so far i got is the MouseGetPos() function but it just give me coords at a specific TIME. I need to do that at the specific Event: Left Mouse click. I didn't figure out yet how to do this. Anyone can help me ?

I hope the question it's clear. I'm waiting for any replies that can help. Thank you much.

Arkie

Link to comment
Share on other sites

#include <Misc.au3>
While 1
    Sleep(50)
    If _IsPressed(01) Then
        $Pos=MouseGetPos()
        MsgBox(0,"","X: " & $Pos[0] & " Y: " & $Pos[1])
    EndIf
WEnd

:P

Ah.. misc.au3. have to check it deeply next time. Thank you for your answer.

Arkie

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...