Jump to content

How to tell if mouse is pressed down?


Recommended Posts

I wrote a little recording program a few days ago. I press a hotkey to record a mouseclick at the current location. Pretty straightforward. I want to add a second way of recording, by just clicking. How do I tell the state of the mouse? I need to know when it goes down (clicked), so I can make note of the coordinates, and start a timer. Then when I let up, stop the timer and record something like

MouseUp("primary")
Sleep(273)
MouseUp("primary")

I looked through the help file, but couldn't seem to find how to tell when the mouse is down. It seems pretty simple. I thought of something like hotkeyset for the mouse, but then it would "eat" every click, and defeat the purpose.

How can I tell when the mouse is down?

Thanks for you help :D

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...