AutoHotKey Equivalent for Mac

Discuss other programming languages besides AutoHotkey

AutoHotKey Equivalent for Mac

08 Aug 2017, 17:32

Hey all,
I am trying to create a quizbowl-esque game on the Discord chat service and am using AutoHotKey to quickly trigger the buzzer system. The game will be for a school project. I am using the following code:

Code: Select all

#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases. ; #Warn ; Enable warnings to assist with detecting common errors. SendMode Input ; Recommended for new scripts due to its superior speed and reliability. SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory. Gui, +alwaysontop Gui, Add, Button, gBuzzer1, Round #1: Buzz! Gui, Add, Button, gBuzzer2, Round #2: Buzz! Gui, Add, Button, gBuzzer3, Round #3: Buzz! Gui, show Return Buzzer1: { Send, !{Esc} ; Changed from Alt+Tab Sleep, 20 Send, ?buzz{Enter} } Return Buzzer2: { Send, !{Esc} ; Changed from Alt+Tab Sleep, 20 Send, {!}buzz{Enter} } Return Buzzer3: { Send, !{Esc} ; Changed from Alt+Tab Sleep, 20 Send, /buzz{Enter} } Return Esc::ExitApp
I want to be able to play this game on mac as well as windows, so was curious whether any of you know of an equivalent program for mac. It would be amazing to have it work on I-phone and Android too, but I assume that would be far too hard to figure out. Thanks so much for any advice.
User avatar
Posts: 1403
Joined: 20 Jul 2014, 10:16
GitHub: Masonjar13
Location: Не Россия

Re: AutoHotKey Equivalent for Mac

12 Aug 2017, 09:19

You could try running AHK in WINE. It doesn't have full support, but based on what you have, it should probably work. That would double for Linux. For mobile, you'd have to translate to Java, or JavaScript if you use a framework for it (I don't think JavaScript can simulate keystrokes/input content to external sources). You'd have to be a little more creative though, seeing as smartphones don't have keyboards (an overlay menu, perhaps).

Besides WINE, you might try AppleScript, or if it doesn't have that kind of functionality, I'm sure Swift would. Probably.

Alternatively, you could set up a virtual server that everyone could create their own instance for and that allows them to connect to their own chat interface, running the script along side it. Less reasonable, but technically possible.
Posts: 623
Joined: 22 Jan 2017, 19:37

Re: AutoHotKey Equivalent for Mac

28 Feb 2018, 17:52

I've been working on getting ahkx working in Linux Mint, no joy yet, but I think I'm almost there, I think.
The major bugbear is that I'm running 64-bit Linux Mint 17.1. I downloaded wine from source, since the distro's wine wouldn't compile. I got ahkx to build, but it won't run as a 64-bit app. When I changed the build file to add -m32 flags, winegcc still tries to link against the 64-bit libraries (apparently a known bug), and it chokes.

Next thing I'll try is lxc to try to compile it in 32-bit. If anybody's got any ideas, bring 'em on!


Return to “Other Programming Languages”

Who is online

Users browsing this forum: Bing [Bot] and 4 guests