Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I am a new Mac user and while I was on Windows I used to use AutoHotkey in order to assign NumPad keys for Photoshop shortcuts. I have heard that in order to do the same thing one can use IronAHK that is exactly the same but can run on Mono. I tried installing Mono, but I have NO clue if I have installed the right thing, how to use it ... or how to get my IronAHK started.

Can anyone help me, guide me a bit?

share|improve this question
    
If you have done any research at all for yourself (eg visited ironahk.net) it might be as well to say so specifically in this case because at present there seems no sign that you have made any effort - which does not encourage others to bother to help you! –  pnuts Dec 13 '12 at 15:12

2 Answers 2

Assuming you have already installed mono like you said, then you should be able to install IronAhk, by going to the ironAhk site and downloading your binaries, this comes as a zipped folder, open that and run setup.sh from the terminal.

If you do ./setup.sh it will tell you where it's default install directory will be, on mac /usr run sudo ./setup.sh install from the terminal and it will install it.

Go into the /usr/bin folder and run IronAhk and it should say No source path specified.

Give it a source path, the example.ahk provided in the download

This may give you an error message:

Could not execute: An exception was thrown by the type initializer for System.Windows.Forms.WindowsFormsSynchronizationContext

To fix this you will need to install Xquartz: http://xquartz.macosforge.org/landing/

After which you log out, log in, and run the example above which should give you a little hello world msgBox.

share|improve this answer

This is what worked for me. I downloaded Mono MRE from http://download.mono-project.com/archive/3.8.0/macos-10-x86/.

The latest 3.10.0 version has problems, there are some bug reports about the error -- "Could not execute: GdipCreateFromContext_macosx" which I was getting. Run the installer for Mono 3.8 version which doesn't have this bug. I couldn't not get 3.10 to work at all with IronAHK on my Maverick's version of the OS.

You may need to install xquartz and xcode if they're not already installed (xcode is available from the app store, I believe). info about xquartz is in the other answer. I'm not 100% sure they're required, but they may be.

Next download and extract the latest release zip file for IronAhk from github.com/polyethene/IronAHK/releases . The "site" is only a github repo, so not much to see there and very little documentation. The setup.sh file inside the extracted archive didn't work for me, so I needed to use the make files.

I opened a terminal and changed to the directory of the extracted files and typed:

make

and after that completed (ignored some warnings about unreachable code), I typed:

sudo make install

That installed ironahk to /usr/bin/ironahk

You can try running it by changing to the IronAHK directory inside the extracted files trying

ironahk Example.ahk

If you see a popup window then it works. I got an error and had to set an environment variable for it to work before calling the program.

So this worked for me:

LD_LIBRARY_PATH=/Library/Frameworks/Mono.framework/Versions/current/lib ironahk Example.ahk

PS. This ran the example script, but I got some problems running some scripts that used keyboard hotkeys. I believe the MacOS security model for programs that intercept keyboard input has changed, so perhaps it will be difficult to get running. The last update to this program (as of now) was 2010, so this seems to be a fairly dead project.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.