Skip to main content
j.khakase
Inspiring
Dec 31, 2022 3:58 AM UTC
Answered

Is there a way to set custom shortcut key to specific Illustrator script?

Is there a way to set custom shortcut key to specific Illustrator script?

I want to run a script which is listed in my script collection with Alt+1 key

is this possible?

krasnovpro
krasnovproCorrect answer
Participating Frequently
Jan 2, 2023 1:25 PM UTC

You can use autohotkey. I prefer version 2.

 

Download autohotkey, unzip, create near AutoHotkey64.exe file AutoHotkey64.ahk with this code:

 

#Requires AutoHotkey v2.0
#SingleInstance Force

#HotIf WinActive("ahk_exe Illustrator.exe")
  !1:: aiScript("script1")
  !2:: aiScript("script2")

aiScript(name) {
  static app := "c:\Program Files\Adobe\Adobe Illustrator 2023\Support Files\Contents\Windows\Illustrator.exe"
       , path := "c:\Users\user\Documents\aiScripts"
  if FileExist(script := name) 
  or FileExist(script := path "\" name) 
  or FileExist(script := path "\" name ".jsx") 
  or FileExist(script := path "\" name ".js") 
    Run('"' app '" "' script '"',, "max")
}

 

run AutoHotkey64.exe

 

In Illustrator:

Alt-1 will run c:\Users\user\Documents\aiScripts\script1.jsx

Alt-2 — c:\Users\user\Documents\aiScripts\script2.jsx

 

32 replies

MikeLe20
Participating Frequently
Nov 15, 2026 4:21 PM UTC

AutoHotkey is Windows only, so here's the Mac side for anyone who lands here. Super Shortcuts is a free app I made that puts any menu item on a key. Pick File › Scripts › the script, then press something like Caps Lock + 1. It skips the Action step, so you're not limited to F-keys. Mac only, with an optional $39 one-time license.

Translate
Colin Flashman
Community Expert
Community Expert
Apr 23, 2025 10:14 PM UTC

If you are using an Elgato Streamdeck after March 2025 it is possible to use the "action" technique but instead of assigning a hotkey, you can now assign an action directly into the Elgato Streamdeck as a button.

EDIT - ONLY FOR PHOTOSHOP. Realised this is an Illustrator question. Oops.

Here is an example that I added to one of my Streamdeck button screens so that I could quickly run a photoshop action after editing a file in acrobat (acrobat would launch photoshop and I could run the script using my Elgato Streamdeck button).

Unsure if this also works with the Logitech MX Creative Console - if it does, I'll edit this post once I'm at home (currently at the office)

 

Translate
If the answer wasn't in my post, perhaps it might be on my blog at colecandoo!
Known Participant
Apr 23, 2025 10:55 PM UTC

Thanks for taking the time on that! I need something that doesn't require any additional hardware or software, though, since I need to provide it to other team members at my company.

Translate
Known Participant
Apr 23, 2025 10:56 PM UTC

Ugh, where are the Edit and Delete functions in this forum?

 

Come on, that's just pathetic.

Translate
Participant
Aug 22, 2024 9:20 AM UTC

You can use Actions to create shortcut for your script.

Simply from Action window
> New Action
> Name it > set your shortcut > then choose your script
> from the 3 Dashes on the top right of the Actions menu
> Insert Menu Item
> Type the name of your script (same as the naming of the jsx file)
> Find (by starting typing a little part of it it and might work, be sure it finds your script not other command)
> Ok
> Congrats 🥳

if you forget to set the shortcut when creating your action, you can do it like this:
> Select your new Action in the Action window
> go the 3 Dashes top right
> Action Options
> set the shortcut you wanted.
> Congrats 🥳

 

Translate
Inspiring
Apr 22, 2025 12:11 AM UTC

Unbelievable. Thanks for pointing out this defect, and a workaround.

Translate
AlinaMiler
Participant
Jan 2, 2023 2:38 PM UTC

Yes, you can set custom shortcut keys for specific Illustrator scripts. Here's how:

  1. Open Illustrator and go to the "File" menu.
  2. Select "Scripts" and then "Other Script..." from the dropdown menu.
  3. Find the script you want to set a shortcut key for and select it.
  4. Go to the "Edit" menu and choose "Keyboard Shortcuts..."
  5. In the "Keyboard Shortcuts" window, click on the "Scripts" folder in the list on the left.
  6. Scroll through the list of scripts on the right until you find the one you want to set a shortcut key for.
  7. Click on the script name, then click in the "Shortcut" field.
  8. Press the keys you want to use as the shortcut.
  9. Click "Accept" to save your changes.
    You can also use the "Shortcuts For" dropdown menu at the top of the "Keyboard Shortcuts" window to select a different set of shortcuts to customize. This can be useful if you want to create a separate set of shortcuts for different tasks or projects.
Translate
CarlosCanto
Community Expert
Community Expert
Jan 2, 2023 5:26 PM UTC

Hi @AlinaMiler, are you using a third party software? The instructions don't seem to be native to Illustrator

Translate
Sergey Osokin
Inspiring
Jan 1, 2023 9:40 AM UTC

What operating system do you use: Windows, Mac OS?

Translate
j.khakase
j.khakaseAuthor
Inspiring
Jan 2, 2023 3:58 AM UTC

Windows 10

Translate
krasnovpro
krasnovproCorrect answer
Participating Frequently
Jan 2, 2023 1:25 PM UTC

You can use autohotkey. I prefer version 2.

 

Download autohotkey, unzip, create near AutoHotkey64.exe file AutoHotkey64.ahk with this code:

 

#Requires AutoHotkey v2.0
#SingleInstance Force

#HotIf WinActive("ahk_exe Illustrator.exe")
  !1:: aiScript("script1")
  !2:: aiScript("script2")

aiScript(name) {
  static app := "c:\Program Files\Adobe\Adobe Illustrator 2023\Support Files\Contents\Windows\Illustrator.exe"
       , path := "c:\Users\user\Documents\aiScripts"
  if FileExist(script := name) 
  or FileExist(script := path "\" name) 
  or FileExist(script := path "\" name ".jsx") 
  or FileExist(script := path "\" name ".js") 
    Run('"' app '" "' script '"',, "max")
}

 

run AutoHotkey64.exe

 

In Illustrator:

Alt-1 will run c:\Users\user\Documents\aiScripts\script1.jsx

Alt-2 — c:\Users\user\Documents\aiScripts\script2.jsx

 

Translate
Monika Gause
Community Expert
Community Expert
Dec 31, 2022 10:08 AM UTC

If the script is installed and you can call it from File > Scripts, then you can call it in an action. And then set a shortcut to that action. Do you know how to create actions?

Translate
j.khakase
j.khakaseAuthor
Inspiring
Jan 2, 2023 4:01 AM UTC

Yes, I know how to create actions and assign it shortcuts. but there is limitation to assign it. We can't assign the shortcut which I am expecting Alt + 1

Translate
CarlosCanto
Community Expert
Community Expert
Jan 2, 2023 5:00 AM UTC

no, unfortunately only F keys can be assigned to Actions, which is the only way to run scripts via shorcut key.

 

 

Translate