How to tell if mouse is pressed down?

Recommended Posts

danielmohr91 0

danielmohr91 0

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

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.