Convert AutoHotKey Script to KeyboardMaestro for Mac Using Existing AHK File

Hey Guys. I am in need help to convert existing AutoHotKey script I have on my windows machines.

I have an existing ahk file which I will provide you.

It would be great if you could show me how to use these scripts on a mac too.

Is this something anyone here can help me with? Happy to make it worth your while!
Thanks a ton, im located in Melb.

Post your AHK script, along with detailed comments about what each line does (if not obvious), and then we can offer some guidance.

Having said that, the Mac is different from Windows in so many ways, the best approach might be for your to list the Mac workflow you want to automate, step by step.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

@valcito, welcome to Keyboard Maestro (KM) and its Forum.
KM is one of the best Mac automation tools available, its Forum is one of the best and friendliest forums on the Internet. Whenever you reach a tough stumbling block trying to use KM, please feel free to post your question/problem here for help.

You will also find this helpful:
Tip: How Do I Get The Best Answer in the Shortest Time?

Getting Started with Keyboard Maestro

For more help, see Getting Started with Keyboard Maestro and the Forum .

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

1 Like

Hello. Can you help me to translate this?

#SingleInstance
#NoEnv
#MaxHotkeysPerInterval 600
#InstallKeybdHook
SendMode Input
SetWorkingDir %A_ScriptDir%

Tap1 := 0
Tap2 := 0
delay := 25


#IfWinActive Worms



~PgDn::Suspend, On
~PgUp::Suspend, Off





*z::
  if Tap1 = 1
    return
  Tap1 := 1
  send {Space up}
  send {Space down}
return


*z Up::
  Tap1 := 0
  sleep, delay
  if (Tap2 = 0 && Tap1 = 0)
    send {Space up}
return


*x::
  if Tap2 = 1
    return
  Tap2 := 1
  send {Space up}
  send {Space down}
return


*x Up::
  Tap2 := 0
  sleep, delay
  if (Tap2 = 0 && Tap1 = 0)
    send {Enter up}
   send {Space up}
return

*.::
  if Tap2 = 1
    return
  Tap2 := 1
  send {Space up}
  send {Space down}
return


*. Up::
  Tap2 := 0
  sleep, delay
  if (Tap2 = 0 && Tap1 = 0)
    send {Space up}
return

Hey @Enceladus,

Welcome to the forum!  :sunglasses:


Not from the code... It's been 15 years, since I've touched AHK, and I'm not aware of anyone on the forum who actively uses it. I don't know everyone, so maybe you'll get lucky and someone will chime in.

Otherwise and in general – you'll have to more definitively define what you're trying to accomplish.


If you haven't seen these they're worth a moment of your time:


Take Care,
Chris

(Keyboard Maestro Moderator)

Hey,

Thank you for having me and the fast reply.

I was using the script in Windows to play a version of the game Worms Armageddon.

The script is basically remapping 3 keys but somehow you could overpass a certain technical restriction. The restriction to let the system to recognise two keystrokes at once by pressing both at the same time.

I think this has something to do with the send {Space up} send {Space down} part. Maybe I'm wrong tho.

For more clarification; The keys Z and X are both activating Space but somehow the script can overcome the delay between the keystrokes.

Best regards,

Keyboard Maestro is not going to do that.

There's a chance BetterTouchTool might, but I haven't used it for years and can't say for sure.