56

Is there an equivalent product/method for AutoHotkey. For those that don't know, its a product that allows you to program your mouse movements and keyboard. This allows me to "macro" certain functions on programs instead of having to do it manually. In the old days they used to call them keyboard stuffers. But that is only half of the solution as I need a "mouse movement" stuffer as well.

Is there such a beast?

  • Please specify a system family or a system version in your question (f.e. Mac OS X Mavericks) – klanomath Oct 30 '14 at 22:58
  • 1
    @klanomath Yosemite, so the driver signing issue might be an issue for anything that exists. Although I'm not attached to Yosemite – Meer Borg Oct 30 '14 at 23:08
  • I use Kantu's desktop automation as "AutoHotkey for Mac" - even so both tools are quite different. Kantu's visual approach is easier to use, but not as powerful as Ahk on windows. Kantu is open-source, too. – Jim Grigoryan Mar 26 at 14:32
26

I recommend Keyboard Maestro which lets you set up macros with various actions that can be triggered with keyboard shortcuts or other triggers.

  • 1
    Doesn't seem to do mouse movements, did I miss something? – Meer Borg Nov 1 '14 at 0:08
  • @Meet Sure does: there's an action for click, hover, scroll and drag. – grg Nov 1 '14 at 10:13
  • 4
    Wow, this is beyond what I thought was possible, not only does it macro mouse movements in loops, it can detect a pixel on the screen so i know if a state has changed. – Meer Borg Nov 6 '14 at 8:50
  • 4
    -1 OP says "equivalent to AHK", which is free. This product is not free and hence not equivalent. – Robino Aug 8 '17 at 19:32
  • Do this thing is free? Or just provide a trial? – Rich Feb 19 at 7:29
23

Check out Hammerspoon. It seems to be very fully featured and — like AutoHotkey — offers a programmatic way to do all sorts of OSX automation, in addition to key binding/remapping.

(It takes a plugin based approach. Karabiner, mentioned in an answer above, can be used as a plugin too allowing its functionality to be enhanced in all sorts of ways.)

http://www.hammerspoon.org/

  • 2
    This deserves more upvotes, this is a really powerful tool, thank you for sharing! – njfife Jun 23 '16 at 21:23
  • 1
    and it's free, and open source! – Brad Parks Feb 4 '18 at 3:08
11

I use Karabiner. It is a bit of a pain to customize (it uses XML), but it is just as powerful as AHK. It can also move the mouse.

  • Looks promising, will try it out, hope it works. – Meer Borg Nov 1 '14 at 0:09
  • 1
    Followed the instructions in this blog post, and works wonderfully: jeromyanglim.tumblr.com/post/35261000440/… Thanks! – e9t Oct 4 '15 at 12:50
  • 1
    It's obsolete with newer versions of MacOS, being replaced with Karabiner Elements which does not support mouse anymore, is extremely lacking in keyboard features and still fairly buggy. I highly recommend Karabiner for pre-Sierra systems though. – Kesarion Nov 4 '17 at 11:36
2

I use BetterTouchTools. It can emulate button pressees, mouse clicks, lots of useful functions depending on the currently open application.

Ex: F1 in evernote makes text bold, F2 makes text bigger, F3 selects the whole line:
enter image description here

BetterTouchTools was free until very recently. Now it switched to a 'pay as much as you like' model with a minimum of ~2 dollars or so.

However, it's a GUI based automater, it doesn't have the programming features that Autohotkey has. You can however combine multiple actions like activating a window, press a button, hide a window again etc..

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .