Skip to content

Instantly share code, notes, and snippets.

@youandhubris
Last active March 30, 2018 23:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save youandhubris/706c26c933e477d2bc170130308f1740 to your computer and use it in GitHub Desktop.
Save youandhubris/706c26c933e477d2bc170130308f1740 to your computer and use it in GitHub Desktop.
Create custom Services, Automator (Mac) and Windows AutoHotkey (Windows), and trigger them with keyboard shortcuts.

Trigger a Service created in Automator (Mac)

As an example, trigger an Illustrator script using a keyboard shortcut. Credit to Joonas.


  1. Open Automator

  2. Create a new Service

  3. At the top Service receives [no input] in [Adobe Illustrator]

    If you specify [any application], you can launch the script when any window is active

  4. Add action Get Specified Finder Items

  5. Add the file/script

  6. Add action Open Finder Items

  7. Open with [Adobe Illustrator]

  8. Save service

    Make sure you remember the name for this next step

  9. Go to MacOS System Preferences > Keyboard > Shortcuts > Services > General

  10. Add a shortcut for it, ex: alt + cmd + §

Trigger a Service created in AutoHotkey (Windows)

As an example, trigger an Illustrator script using a keyboard shortcut in AutoHotkey. Credit to Joonas.


  1. Create a new text file with the extension ahk Replace the path with your own. The ^!. equals to Ctrl+Alt+. List of modifier key symbols.
#IfWinActive, ahk_class illustrator
^!.::Run, Illustrator.exe C:\path\to\script

Remove the first line of the code, if you want to be able to trigger the script from any application

  1. Open that file in the AutoHotkey You should see it running in the System Tray under a green H icon You can close it from the System Tray via context menu

    If you want the hotkey to always be accessible (and not just when you remember to open the ahk file), just put the file in the windows startup folder

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment