Mobile app version of vmapp.org
Login or Join
LarsenBagley460

: How to set keyboard shortcut to run script in Illustrator Is there a way to setup a keyboard shortcut to run a custom script in Illustrator? So far I haven't found a way. If this is not

@LarsenBagley460

Posted in: #AdobeIllustrator #IllustratorScripting

Is there a way to setup a keyboard shortcut to run a custom script in Illustrator? So far I haven't found a way. If this is not possible to do from within Illustrator, is there a 3rd party solution for that?

10.04% popularity Vote Up Vote Down


Login to follow query

More posts by @LarsenBagley460

4 Comments

Sorted by latest first Latest Oldest Best

 

@Looi7658678

Good news!

In Illustrator 2018 there is a work around.

Adding a custom script to an Action now retains the script when you close and re-open Illustrator so you can now create an action to record your script then assign a keyboard shortcut to the action... finally!

10% popularity Vote Up Vote Down


 

@Candy945

For the Mac, Spark is a fantastic app that easily lets you set shortcuts for illustrator scripts (File>Scripts) as well as other oft-used menu items you want to setup.

10% popularity Vote Up Vote Down


 

@Ogunnowo857

3rd party solutions



Automator ( Mac - Native app )

Recently made a video about this.


Create a new Service
At the top: Service receives [no input] in [Adove Illustrator CC 2015.app]


If you don't specify application here, you can launch the script when any window is active, which can be useful.

Search and add action: Get Specified Finder Items.


Add the .jsx script here.

Search and add action: Open Finder Items.


Open with: "Adobe Illustrator CC 2015.app"

Save service: Cmd+S


Make sure you remember the name for this next step

Go to OSX System preferences > Keyboard > Shortcuts
You should be able to find your script under General


Add a shortcut for it.





Alfred ( Mac - £17 to unlock feature required to do this )

Automator does this same thing quite well, but I always have to mention Alfred, since it has a few benefits:


You got the workflow and the hotkey in one place.
You can also have multiple workflows in one place. Something like this.
Can sync workflows through dropbox. Meaning that if you trigger the scripts from dropbox, you can use the same workflow on multiple computers easily.
You also have the option to trigger scripts via keywords in Alfred, which can be super helpful.


Recently made a video about this. Not the best video quality. Forgot to record it full screen.


Alfred Preferences > Workflows tab
From the bottom left: Click the + icon and add Blank Workflow


Give it a descriptive Workflow Name: and press Create

From the top right: Click the + Icon and add Triggers > Hotkey


In the first tab Hotkey settings, set a hotkey combination
In the second tab Related Apps, drag Illustrator.app inside the window and Save

From the top right: Click the + Icon and add Actions > Open File


Drag your .jsx file to that first box on the left
Drag Illustrator.app to the second box on the right and Save

Drag a line from the right side of the Trigger to the left side of the Action to connect them.




Autohotkey ( Windows - Free )


Add this code below to a new notepad document:


Replace the path with your own.
The ^!. equals to Ctrl+Alt+. List of modifier key symbols.




#IfWinActive , ahk_class illustrator
^!.::Run, Illustrator.exe C:UsersjoonasDesktoptest.jsx





Save that with an extension .ahk
You can open that file in the default app (ahk).


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.
Remove the first line of the code, if you want to be able to trigger the script from any application.


Note that if you don't plan your hotkeys carefully, this can block other hotkeys from Illustrator or other applications, if you decide to get rid of that first line.

10% popularity Vote Up Vote Down


 

@Caterina889

You can create an action which calls the script via the Insert Menu Item command, then assign an F-key shortcut to the action.

However, Illustrator fails to retain script designations in actions when you quit the application (long standing bug). So, this means every time you launch AI you have to reset the action to see the script.

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme