r/programminghelp • u/Teutonic_Memes • Nov 13 '20
Other How could I go about making a program that counts individual mouse clicks?
Not like those ones where you click one specific spot, but like counting overall clicks regardless of where, and maybe allows you to reset said count. Sorry if this is too specific, but I just need this for a mapping project I'm working on, and I don't want to go crazy mentally counting each of the thousands of clicks. Any feedback is greatly appreciated!
4
Upvotes
0
u/GoldFisherman Nov 13 '20
You'll want to initialize the number of clicks to 0.
For whatever language you are using, see if there is a function or method similar to onMouseClick().
Everytime the method in step 2 is called, increment the count.
2
u/[deleted] Nov 13 '20
Short Answer: Yes.
Long Answer: Depends entirely on what language you choose and if it has the system hooks to read mouse clicks without being in focus, etc etc etc.
Do a little research and pick a language you're comfortable with, then start investigating. If you have issues, feel free to post again.