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?
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)
...
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?
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
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.
Copy link to clipboard
Copied
thank you, for confirmation
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
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
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.
Copy link to clipboard
Copied
What operating system do you use: Windows, Mac OS?
Copy link to clipboard
Copied
Windows 10
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
Copy link to clipboard
Copied
absolutely correct, thank you so much @Sergey Osokin and @krasnovpro . you saved my many clicks
Copy link to clipboard
Copied
Yes, you can set custom shortcut keys for specific Illustrator scripts. Here's how:
Copy link to clipboard
Copied
Hi @AlinaMiler, are you using a third party software? The instructions don't seem to be native to Illustrator
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?
Copy link to clipboard
Copied