Jump to content

Adhd - Ahk Dynamic Hotkeys For Dummies


4 replies to this topic

#1 evilC

    Member

  • PipPipPipPipPipPipPipPip
  • Legendary Founder
  • Legendary Founder
  • 1,298 posts
  • LocationLondon, UK

Posted 06 July 2013 - 10:48 AM

Download

HomePage

GitHub page

What is ADHD?
ADHD is a Library for writing macros - programs that will map one button to another, perform a certain sequence of clicks, or whatever other functions you desire.

ADHD is written using AutoHotkey (AHK). AHK makes writing macros really easy, for example, to solve that annoying issue in MWO with not being able to bind zoom to mouse wheel, using AHK this can be solved by pasting the following three lines of code into a text file and double clicking it:
Wheelup::
   Send {z}
   return

Simple and powerful.
OK, so you start writing macros to solve problems with the game, but a script that works with your controls on one of your mechs, might need editing to work with another of your mechs or your friend's control setup.
Can you really be bothered?

ADHD is the answer.

With ADHD you simply start with a template, here is the default one.
Don't be scared - 99% of the file is documentation - all the lines startiing with a ; are comments intended to help you.
It is long to show you all the possible things you can do. If you are not interested in a feature, simply do not configure it.

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:
Posted Image

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:
Posted Image

Profiles tab: Saves / Loads the contents of the Bindings and Main tabs to / from Profiles:
Posted Image


With a little creativity, you can cram quite a lot of features into one macro. Here is my fire control macro:
Posted Image

Posted Image

Posted Image

Edited by evilC, 06 July 2013 - 10:52 AM.


#2 evilC

    Member

  • PipPipPipPipPipPipPipPip
  • Legendary Founder
  • Legendary Founder
  • 1,298 posts
  • LocationLondon, UK

Posted 06 July 2013 - 10:48 AM

Planned Features
  • Allow fast profile switching. Set hotkey for a specific profile seems like the best idea, as it would add the ability to swap profile mid-game.
  • Make it easy for users to create hotkey gui items, to define what key is sent by an action.
  • Add disable hotkey to bindings -Disables all functions.
  • Allow user to add or remove "extra rebinds". Adds an extra box to the bindings tap that allows user to specify a simple from --> to remap.

Edited by evilC, 07 July 2013 - 10:41 AM.


#3 evilC

    Member

  • PipPipPipPipPipPipPipPip
  • Legendary Founder
  • Legendary Founder
  • 1,298 posts
  • LocationLondon, UK

Posted 07 July 2013 - 08:47 AM

New version up, 1.1
Fixed bug where app_active was being fired instead of app_inactive.

Edited by evilC, 07 July 2013 - 08:47 AM.


#4 evilC

    Member

  • PipPipPipPipPipPipPipPip
  • Legendary Founder
  • Legendary Founder
  • 1,298 posts
  • LocationLondon, UK

Posted 07 July 2013 - 10:04 AM

New version up, 1.2
Added a new hook - resolution_change. Fires when the resolution of the "Limit app" window changes.
An example of it's use is in Fire Control - it uses it to detect going between mechlab and game.

Edited by evilC, 07 July 2013 - 10:12 AM.


#5 Egomane

    Member

  • PipPipPipPipPipPipPipPipPipPip
  • 8,163 posts

Posted 08 July 2013 - 01:23 PM

Closed!

One thread is enough, so please continue -> here <-.





2 user(s) are reading this topic

0 members, 2 guests, 0 anonymous users