Mouse Click Counter

Non-OBS Script Mouse Click Counter

Many times I have felt that how cool it would be to display the number of mouse clicks you make while on stream.

I saw some code from this web click counter (https://www.clickspeedtester.com/click-counter) and found that it can be replicated for AutoHotKey too.

So, I wrote this script that can be used with AutoHotKey. It counts the number of mouse clicks and displays the count on screen.

Steps to Use Mouse Click Counter
1. First, you need to install AutoHotkey.
2. Create a new notepad file clickcounter.txt
3. Copy the code below into the txt file.

Code:
filePath = C:\Users\Nick\Documents\clicks.txt
~RButton::
~LButton::
ClickCount += 1
Delete:
FileDelete, %filePath%
FileAppend,%ClickCount% clicks, %filePath%
Return

4. Change the file extension and save this file as 'clickcounter.ahk' instead of 'clickcounter.txt'.
5. Double click on the file to run it and it will start counting the clicks.

You can change the 'filePath' variable to store clicks.txt at your desired location. You can also open this file to see the count.

Next we need to add this to OBS.

1. Open OBS and add new text source.
2. Select "Use Text From File" and browse for "clicks.txt".

That's it. Now the click count will be displayed directly on your stream. The count updates in real-time and your viewers can see it.
  • Love
Reactions: nickjones35
Author
nickirwin
Views
5,029
First release
Last update
Rating
0.00 star(s) 0 ratings
Top