mark2004 Posted November 15, 2007 Posted November 15, 2007 I would like my script to capture when someone clicks the mouse and run a certain function. I recall a while back using windows notifications to do some neat things with controls and I thought I remembered there were some constants that defined the mouse buttons etc. Whenever I needed to mess with the Windows API in the past I would use an old link to the MSDN site where it listed all the messages/notifications and I could usually figure it out. However, that link is apparently out of date now and I was getting frustrated trying to find the info. Is there a better site to go through the windows notifications etc than the MSDN site?? If so, please share. Any ideas to help accomplish the above would be greatly appreciated.
JustinReno Posted November 15, 2007 Posted November 15, 2007 (edited) I'm not sure about WM, but you could use _IsPressed() for the left button click, and MouseGetPos(), write it to a file. Edit: I'll try to make an example, I've always wondered if that would work, I'll try. Edited November 15, 2007 by JustinReno
mark2004 Posted November 15, 2007 Author Posted November 15, 2007 Well I tried the _Ispressed() function and it does capture the mouseclick and run my function. Thank you for that. However, I noticed that it still performs the actual mouse click wherever the mouse happens to be. I wonder if there is a way to have the mouse click run my function but not actually perform a real click?? I am working with a person with a disability that would like to use the touchpad on her laptop to simulate the pressing of the spacebar. The Ispressed() method would allow me to press the spacebar via a function but the blinking caret (in a word processor) would be relocated to wherever the mouse pointer was located since an actual click will still be performed. This could get messy since the blinking caret would be constantly re-located to where the mouse pointer is located. Any further ideas???
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now