Autohotkey for Mac

Get help with using AutoHotkey and its commands and hotkeys
Laura
Posts: 1
Joined: 18 Jan 2017, 12:25
Google: Laura Patakfalvi
GitHub: Laura

Autohotkey for Mac

18 Jan 2017, 12:29

Hi, is this compatible with OSX? If not any alternatives you suggest
Thank you!
FanaticGuru
Posts: 1356
Joined: 30 Sep 2013, 22:25

Re: Autohotkey for Mac

18 Jan 2017, 19:50

Laura wrote:Hi, is this compatible with OSX? If not any alternatives you suggest
Thank you!
No, it is not compatible. I am not familiar with alternatives for OSX.

FG
Hotkey Help - Help Dialog for Currently Running AHK Scripts

AHK Startup - Consolidate Multiply AHK Scripts with one Tray Icon

[Function] Timer - Create and Manage Timers
mwk
Posts: 1
Joined: 24 Feb 2017, 09:43

Re: Autohotkey for Mac

24 Feb 2017, 10:02

First, you may be able to accomplish all the key mapping you need via the stock system preferences on MacOS. Unlike, Windows, the Mac is very flexible when it comes to managing keyboard shortcuts.

Apple Menu -> System Preferences -> Keyboard -> Shortcuts. You'll see a list of the left side of the preference panel with a number of categories (Spotlight, etc.). The last item, "App Shortcuts", is where you can set your own shortcuts for all applications or specific applications. It's amazing that Microsoft still doesn't offer this in Windows 10.

Another *great* 3rd-party utility for the Mac, is Karabiner (formerly KeyRemap4MacBook). It will do very sophisticated key mapping -- probably on-par with AHK. However, if you want to do something simple, it may have a simple option built-in. For example, I use it to make the space bar behave as a the ctrl key when pressed with another key (saves the emacs pinky).

https://github.com/tekezo/Karabinerapping

Good luck!
BoBo
Posts: 2519
Joined: 13 May 2014, 17:15

Re: Autohotkey for Mac

17 May 2017, 04:24

[OffTopic]
Why not start to get used to a PC? :P
OK, you're allowed to use your standard MAC keyboard :shh:
[/OffTopic]

AutoHotkey Mappings to emulate OSX behavior with a Mac keyboard on Windows

This AutoHotkey configuration file makes usual keyboard shortcuts work with an Apple keyboard on Windows. It has been testet with a german keyboard layout, but should work under different layouts as well.


[More...]

by Jonathan Ströbele (stroebjo)
bsmunro

Re: Autohotkey for Mac

01 Jun 2018, 00:13

Give BetterTouchTool a try. Money may be required, I cannot remember.
RickC
Posts: 220
Joined: 27 Oct 2013, 08:32

Re: Autohotkey for Mac

03 Jun 2018, 06:38

Unfortunately AutoHotkey cannot be used in macOS. In terms of ease of use vs complexity and capability, have a look at 2 built-in programs - Automator and AppleScript. After the debacle of Windows 10 I'm trying to wean myself off Windows now in favour of macOS (and Linux Mint Cinnamon) and have just started getting used to Automator first... drag'n'drop automation.

Hope this helps...
macnow
Posts: 1
Joined: 26 Mar 2019, 09:35

Re: Autohotkey for Mac

26 Mar 2019, 09:44

I am moving from Mac to Windows, because I have to (job related) :?

Automator is the natural choice in Mac :rainbow: , but it does not work inside the applications (like AHK can). For mac, there is the open-osource kantu desktop automation - it works quite differently then AHK, but does the same: autoamte mouse and keyboard :D
DevinC
Posts: 8
Joined: 01 Sep 2016, 15:11

Re: Autohotkey for Mac

07 Apr 2019, 10:36

Is it possible to run the same AHK code written for Windows on a Mac by using a different software (e.g. Karabiner)?
User avatar
Tigerlily
Posts: 283
Joined: 04 Oct 2018, 22:31

Re: Autohotkey for Mac

07 Apr 2019, 13:08

DevinC wrote:
07 Apr 2019, 10:36
Is it possible to run the same AHK code written for Windows on a Mac by using a different software (e.g. Karabiner)?
I've heard you can do this by translating AHK via another common language, such as Lua. For instance have Lua "interpret" the AHK code by reading regular AHK code and then tranforming it into something Mac OS can understand. (untested on my end, so not 100% sure)
-TL
SOTE
Posts: 716
Joined: 15 Jun 2015, 06:21

Re: Autohotkey for Mac

08 Apr 2019, 08:09

Tigerlily wrote:
07 Apr 2019, 13:08
DevinC wrote:
07 Apr 2019, 10:36
Is it possible to run the same AHK code written for Windows on a Mac by using a different software (e.g. Karabiner)?
I've heard you can do this by translating AHK via another common language, such as Lua. For instance have Lua "interpret" the AHK code by reading regular AHK code and then tranforming it into something Mac OS can understand. (untested on my end, so not 100% sure)
That sounds like a Transpiler or Source-to-Source Compiler, https://en.wikipedia.org/wiki/Source-to-source_compiler. Many other programming languages make use of such. It's interesting that this isn't being done for AutoHotkey. I don't know how well Lua works out as a cross-platform language. C#, Object Pascal, or Red would be good cross-platform candidates as well.

I think the other part of the issue is mindset. The thinking that AutoHotkey code must be married to C++ and Windows, instead of thinking of AutoHotkey as it's own language that could use other interpreters, written in other programming languages.
User avatar
Tigerlily
Posts: 283
Joined: 04 Oct 2018, 22:31

Re: Autohotkey for Mac

08 Apr 2019, 14:16

A quick, read-worthy post from lexikos explaining some of this conundrum:

Can I run AHK on a Mac that is running Windows with Parallels?

Additionally, it appears users in the past have ran Bootcamp and/or Parallels on their Macs to utlilize AutoHotkey - with success. The posts I have seen around the net do not appear to be doing any complex/advanced AHK programming, however, mostly doing simple key remapping as far as I can tell.

Would be awesome if someone could do some testing in this area to see what does/doesn't work. It seems like from lexikos' post that everything should work though. When I have some free time I may do some testing myself and report back :) ;)
-TL
SOTE
Posts: 716
Joined: 15 Jun 2015, 06:21

Re: Autohotkey for Mac

08 Apr 2019, 17:55

Usually the issues presented about AutoHotkey being on a different OS has been the Windows APIs and Dlls, where the code needs to be different for that OS. However, to make this a bit more complicated, there is WINE (https://en.wikipedia.org/wiki/Wine_(software). Open-source software that provides a Windows runtime enviornment for running applications on Linux and Macs. WINE has been discussed a number of times on the forums, example- https://www.autohotkey.com/boards/viewtopic.php?t=25741 (AHK installer under Linux/WINE).

From that forum post about the installer, what we are getting is that the present AutoHotkey developers are very Windows centric and lack any motivation to create a cross-platform version of AutoHotkey. And because they are so Windows centric, this can result in development choices that makes the AutoHotkey source code even harder to port over to a different OS. Though let's keep in mind that the Windows OS still holds a huge user base. The present AutoHotkey C++ interpreter, installer, etc... would have many "landmines", that I believe a person or a group would have no choice but to create a new fork (think IronAHK in C# as an example) or transpiler.

A person or group would likely have to focus on "translating" the AutoHotkey scripting language (not the C++ source code), and create a new interpreter. Preferably one in a more cross-platform friendly language (in terms of tools available), thus the suggestion of C#, Object Pascal, or Red. C# probably being a bit more easier for those that know C++ to adapt to, where Object Pascal is as almost as close to the hardware as C++, but has more cross-platform friendly tools (Lazarus, FPC, etc...). Object Pascal also has some AutoHotkey-like automation tools, such as Simba (often use for making bots) and WinAutoKey (so far a bit limited), that can provide example code. Red being more of a wildcard with future potential.

Going the way of the transpiler, would be more about translating the AutoHotkey scripting language into a compiled equivalent into another programming language. An interpreter would be running AutoHotkey in a way similar to how it runs on Windows, where a transpiler would be more specific to creating an application that could run on a different OS.

Though interestingly, it's not really known how far or what is the limit that somebody could get with AutoHotkey and WINE. Though I would think to make significant progress, it would likely turn into a fork.
DevinC
Posts: 8
Joined: 01 Sep 2016, 15:11

Re: Autohotkey for Mac

09 Aug 2019, 15:31

Sounds complicate. AHK is Windows centric so will leave it at that.

Return to “Ask For Help”

Who is online

Users browsing this forum: Bing [Bot], Chunjee, Flipeador, flyingDman, tmplinshi and 33 guests