Meet AutoHotkey:
AutoHotkey is a free, open-source scripting language for Windows, providing easy keyboard shortcuts, fast macro-creation and software automation, allowing the automation of repetitive tasks in any Windows application. User interfaces can easily be extended or modified by AutoHotkey (source).This became my solution! With AutoHotkey being a language that facilitates macro creation, a whole world of possibilities for enhancing efficiency opens up. Using AutoHotkey, it is possible to assign each button of a macro mouse different keyboard shortcuts/macros depending on the current Windows process that has focus. You don't have to do any manual profile switching either. When you press the macro mouse button, the input is sent to AutoHotkey which automatically checks what the current process is, and then outputs the associated keystroke for that application via an if statement. This method has effectively allowed me to bypass the 5 separate profiles constraint of the mouse software, and the tediousness of having to manually switch between them.
My next great improvement involves multiplying the number of possible combinations to insane amounts through the clever use of modifier keys. Windows keyboards have 4 modifier keys: CTRL, ALT, SHIFT, and the WINDOWS KEY. The beauty of modifier keys is the multiplication effect they have on available combinations. For example, looking at just one mouse button, you can make it output 4 different keyboard shortcuts/macros through the use of modifier keys. If you assign F9 to the mouse button, then you can connect it to macros for: CTRL+F9, ALT+F9, SHIFT+F9, WINDOWS+F9. Just hold down that modifier key when you press the mouse button. What's even better is that AutoHotkey allows you to differentiate between the modifier keys on the left side of the keyboard and the right side. So (left CTRL)+F9 and (right CTRL)+F9 can be used for different macros. Now, instead of just 4 modifiers to pick from, we actually have 8 separate modifiers that can be used together to form unique combinations. Just from modifiers alone, we now have 8 factorial combinations available (8! = 40230).
15 buttons * (8 * 7 * 6 * 5 * 4 * 3 * 2 * 1) modifier combinations = 604,800 available macros per Windows process
I could have stopped there, but I had already come up with another multiplication factor in the brainstorming stage. My final idea I implemented (for now...) is allowing AutoHotkey to differentiate between 3 types of button presses for each mouse button: regular button press, long button press, double button press. For example, if you press a certain mouse button for 1 second, it triggers the macro associated with the long button press. But if you press that button for 0.5 seconds, it triggers the macro associated with the regular button press. This creates a further multiplication factor of 3 to our previous number:
604,800 available macros * 3 new custom mouse modifiers = 1,814,400 available macros per Windows process.
Wow! I went from 75 total available combinations (without the power of process specific macros), to almost 2 million available combinations per process! Integrating my mouse software with AutoHotkey, the only thing constraining me now is my creativity, which is exactly what I wanted. I know this opens me up to more combinations than I can humanly remember, but this was more a test to see how far I could take this and also to learn how to use macros most effectively. This endeavour has brought me to AutoHotkey, which has made my macro capabilities on Windows so much more powerful. Here are the main results of this endeavour:
- Process specific macros that are automatically triggered based on the current process focus.
- 40,320 additional macros from modifiers
- 3 new custom mouse modifiers: long press, short press, and regular press options for each button
- Bottom line: 15 buttons * 40,320 keyboard modifier combinations * 3 mouse modifiers = 1,814,400 available macros per Windows process
No comments:
Post a Comment