Page 1 of 1

[Library]ADHD - User defined hotkeys, profiles etc

Posted: 28 Feb 2014, 10:28
by evilC
What is ADHD?
ADHD is a Library for creating macros. It is primarily aimed at games, but could be used for anything.
What does it do for AHK?
When you write a macro using the ADHD library, it allows you to bind hotkeys to macro functions via a gui, plus handles loading and saving of your settings, profile support (Swap between sets of settings), application limiting (Hotkeys only work inside specified application) and more!
With ADHD you simply start with a template, here is the default one.
Please see the Quick Start Example linked above for a line-by-line description of how this template works.
All ADHD macros create a window to configure the macro - ADHD has a number of tabs to configure it's base functionality, but you get your own tab to put your own GUI items on so that your macro can be condigured. If, for example, you were writing a rapid fire macro, you might add a box to set the fire rate.
For example, here is the template running:
The basic template is just a simple example. It adds a box "String to send", and whatever the user types in the box is sent when the macro is activated.
As mentioned before - all the other tabs are automatically created by ADHD and are present in all ADHD macros - here is a quick rundown of the features:
Bindings tab - allow the user to set which keyboard or mouse button triggers the macro functionality:
Here the middle mouse button has been bound to "Fire". The fire action has been configured to send what was typed into the box on the main tab, so pressing the middle mouse button will type "Hello", but only if we are in Notepad.
Note that this does NOT use the Autohotkey "Hotkey" GUI Control. This is a WAY more advanced technique developed by myself. It is capable of detecting ALL modifiers (CTRL, ALT, SHIFT, WIN) both in combination with any keyboard key or mouse button (eg, CTRL+ALT+WIN+Mouse Wheel Up), or on their own as a left/right variant (eg Left Control).
It is also capable of detecting joystick buttons (But this is currently disabled until I can add in support for button up events).
Profiles tab: Saves / Loads the contents of the Bindings and Main tabs to / from Profiles:
With a little creativity, you can cram quite a lot of features into one macro. Here is my fire control macro for Mechwarrior Online: