1
Post New Requests Here / Key counting script
« on: August 25, 2011, 02:07 PM »
Hi there,
I was led to this forum after searching on the internet for a key counting software, to be exact at skwire's Keycounter discussion page. There I reported a few issues with the software and he replied that those cannot be resolved due to the limitations of Autohotkey; then gave me a simple script for keycounting I could work on. Here's the script:
Now, I thought that it would be better if I took the script out of the quote:
Unfortunately, I do not know any Autohotkey programming, and I basically want this to cover the whole keyboard, auto save the counter data and load it on script startup.
The reason of why I want this is because I am getting a new keyboard soon and I want to track each keypress individually and total, out of curiosity. If it matters (for which keys to add to the counter), I will be getting a Razer BlackWidow: http://tbreak.com/te...h/files/DSC00056.jpg
The initial issues I found with KeyCounter and I do not want to happen are: repeated keys (e.g. holding W for 5 seconds, it repeats the key many times) were being taken in consideration by the KeyCounter. I only want a single keystroke count; and keys combined with a modifier (e.g. alt+2; ctrl+shift+E, etc.), the modifier was being counted but the key(s) under the modifier were not. I wish they were.
skwire,
Thanks for this snippet, I replied at KeyCounter's discussion thread, but you probably did not see the post, were too busy, or whatever the reason is, it does not matter, but I think that you are reading the forums you are moderating
.
EDIT: Ah, I just saw the "Post New Requests Here" page, was I supposed to make the thread there? I am sorry.
I was led to this forum after searching on the internet for a key counting software, to be exact at skwire's Keycounter discussion page. There I reported a few issues with the software and he replied that those cannot be resolved due to the limitations of Autohotkey; then gave me a simple script for keycounting I could work on. Here's the script:
Are you familiar with AutoHotkey programming at all? If so, here's a quick snippet I wrote that will do what you want for letters a-z and numbers 0-9. Press F1 at anytime to see a simple message box showing your keystroke stats. You could easily extend this to cover all keys, to save/load data, display data in a more elegant way, etc.-skwire (August 20, 2011, 03:11 PM)
Now, I thought that it would be better if I took the script out of the quote:
Code: Autohotkey [Select]
- myKeys := "abcdefghijklmnopqrstuvwxyz1234567890"
- ; Iterate through myKeys variable and create a hotkey for each letter and number.
- {
- }
- Return ; End of auto-execute section.
- CountKeys:
- {
- ; Get the third character from the left of the hotkey name.
- ; Increase character counter and total counter.
- %myKey%_Count++
- Total_Count++
- }
- Return
- F1::
- {
- ; Null out report variable.
- myReport := ""
- ; Iterate over myKeys variable and build out report, key by key.
- {
- }
- ; Display report with total at the bottom.
- }
- Return
Unfortunately, I do not know any Autohotkey programming, and I basically want this to cover the whole keyboard, auto save the counter data and load it on script startup.
The reason of why I want this is because I am getting a new keyboard soon and I want to track each keypress individually and total, out of curiosity. If it matters (for which keys to add to the counter), I will be getting a Razer BlackWidow: http://tbreak.com/te...h/files/DSC00056.jpg
The initial issues I found with KeyCounter and I do not want to happen are: repeated keys (e.g. holding W for 5 seconds, it repeats the key many times) were being taken in consideration by the KeyCounter. I only want a single keystroke count; and keys combined with a modifier (e.g. alt+2; ctrl+shift+E, etc.), the modifier was being counted but the key(s) under the modifier were not. I wish they were.
skwire,
Thanks for this snippet, I replied at KeyCounter's discussion thread, but you probably did not see the post, were too busy, or whatever the reason is, it does not matter, but I think that you are reading the forums you are moderating

EDIT: Ah, I just saw the "Post New Requests Here" page, was I supposed to make the thread there? I am sorry.