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
tutorial please
Copy link to clipboard
Copied
This is also cool. I have autohotkey for ages; I didn't know this can be useful with illustrator
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
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...
Copy link to clipboard
Copied
Oh great I did it, thank you very much
Copy link to clipboard
Copied
That's correct. Thanks.
Copy link to clipboard
Copied
Right. Personally, I use this for precision movement in AutoHotkey.
AHK code:
F1 & LButton:: aiNudge("left")
F1 & RButton:: aiNudge("right")
F1 & WheelUp:: aiNudge("up")
F1 & WheelDown:: aiNudge("down")
By holding down F1 and different modifiers, you can use the mouse to move objects in different increments.
Copy link to clipboard
Copied
that doesnt allow you to assign a hot key to a specific script.
Copy link to clipboard
Copied
@Mark34118026rzjg schrieb:
that doesnt allow you to assign a hot key to a specific script.
Who are you answering? AlinaMiller probably was a ChatGPT bot.
Copy link to clipboard
Copied
Replying to the John Travolta image. I guess also applies to AlinaMiller. As you can see there is no place to choose an individual script. Incorrect information should be able to be downvoted.