• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
1

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

Engaged ,
Dec 30, 2022 Dec 30, 2022

Copy link to clipboard

Copied

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?

TOPICS
Scripting

Views

3.9K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Explorer , Jan 02, 2023 Jan 02, 2023

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) 
...

Votes

Translate

Translate
Adobe
Community Expert ,
Dec 31, 2022 Dec 31, 2022

Copy link to clipboard

Copied

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?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Jan 01, 2023 Jan 01, 2023

Copy link to clipboard

Copied

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

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jan 01, 2023 Jan 01, 2023

Copy link to clipboard

Copied

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

 

 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Jan 01, 2023 Jan 01, 2023

Copy link to clipboard

Copied

thank you, for confirmation

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jan 01, 2023 Jan 01, 2023

Copy link to clipboard

Copied

how about a single click to a button to run your scripts? is that an option?

 

if yes, switch your actions panel to Button Mode

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Jan 01, 2023 Jan 01, 2023

Copy link to clipboard

Copied

Few days back I realise that due to Quick access toolbar in PowerPoint, I extermily speedup in editing and align graphics. such functionality didn't experience in Illustrator. so I was trying to achive through script access. I don't want to open panel, observe the button label each time. insted that just remember the number to access my personal scripts

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Enthusiast ,
Jan 02, 2023 Jan 02, 2023

Copy link to clipboard

Copied

You can extend Adobe Illustrator with the free AutoHotkey utility. The AHK scripting language allows you to automate different applications on Windows. Including calling js scripts in Adobe. I asked an AHK expert to write a sample hotkey script call code in this thread.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Enthusiast ,
Jan 01, 2023 Jan 01, 2023

Copy link to clipboard

Copied

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

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Jan 01, 2023 Jan 01, 2023

Copy link to clipboard

Copied

Windows 10

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Jan 02, 2023 Jan 02, 2023

Copy link to clipboard

Copied

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

 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Jan 03, 2023 Jan 03, 2023

Copy link to clipboard

Copied

absolutely correct, thank you so much @Sergey Osokin and @krasnovpro . you saved my many clicks

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Mar 22, 2024 Mar 22, 2024

Copy link to clipboard

Copied

tutorial please

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jan 02, 2023 Jan 02, 2023

Copy link to clipboard

Copied

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.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jan 02, 2023 Jan 02, 2023

Copy link to clipboard

Copied

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

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jan 02, 2023 Jan 02, 2023

Copy link to clipboard

Copied

Your instructions indeed sound pretty promising, Alina.

 

But as well as Carlos I don't see how it would work natively in Illustrator at the moment.

 

Am I overlooking something? Can you perhaps clarify?

 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Jan 02, 2023 Jan 02, 2023

Copy link to clipboard

Copied

1.png

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Apr 24, 2024 Apr 24, 2024

Copy link to clipboard

Copied

There's a better way, but requires having to make an Illustrator Action that simply calls the script from a menu item. Then, the action - within the actions palette - can be assigned a limited amount of KBSCs using the F1-F15 keys and with or without Ctrl/Command and Shift. It's better explained on the following sites:

https://www.illustratorscripts.com/resources/how-to-add-shortcut-to-any-script/
https://community.adobe.com/t5/illustrator-discussions/how-can-i-create-a-shortcut-to-execute-a-scri...

If the answer wasn't in my post, perhaps it might be on my blog at colecandoo!

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
May 31, 2024 May 31, 2024

Copy link to clipboard

Copied

LATEST

Oh great I did it, thank you very much

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines