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

How can I create a shortcut to execute a script?

Community Beginner ,
Jun 17, 2019 Jun 17, 2019

I would like to create a shortcut on the keyboard as Ctrl+L to execute a script file on the illustrator how can I do this?

TOPICS
Scripting
10.0K
Translate
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

Community Expert , Jun 17, 2019 Jun 17, 2019

install the script so it's accessible from the File->Scripts Menu, then record an action to run such script and give it a shortcut key.

It'll help if you create a new Set to record your action into. That way you can save your Action. Sometimes Illustrator "forgets" the script after restarting, if that happens you can easily Load the action instead of re recording.

Translate
Community Expert ,
Jun 17, 2019 Jun 17, 2019

install the script so it's accessible from the File->Scripts Menu, then record an action to run such script and give it a shortcut key.

It'll help if you create a new Set to record your action into. That way you can save your Action. Sometimes Illustrator "forgets" the script after restarting, if that happens you can easily Load the action instead of re recording.

Translate
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 ,
Jun 17, 2019 Jun 17, 2019

Side note (for future questioners😞

This works only with CC 2018+

Translate
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 ,
Sep 28, 2019 Sep 28, 2019
I am on CC2019 (Mac) and this is not working for me
Translate
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 ,
Sep 28, 2019 Sep 28, 2019
Did you use "Insert Menu Item..." when recording the action?
Translate
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 ,
Sep 30, 2019 Sep 30, 2019
Hi Ton, yes Illustrator will find the menuItem when I search for it, but when playing the Action, Illustrator tells me the menu item is currently not available Thanks Stefan
Translate
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 ,
Sep 30, 2019 Sep 30, 2019
And the menu item is the script you added in the recording? Works for me also after restart.
Translate
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 ,
Sep 30, 2019 Sep 30, 2019
Ok, now it works. Skript is only an alert as a test. But I have to have a document open to run it.Thanks for your help
Translate
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
Contributor ,
Aug 01, 2024 Aug 01, 2024

This does not work in 2024 (28.6) on Mac: script is not recorded in the action. ried by clicking script menu item and choosing "run other script".

Translate
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 ,
Aug 01, 2024 Aug 01, 2024

If you install the script in the Illustrator application folder > Presets > Language folder > Scripts

and during the recording of your action use the Insert Menu Item option from the Actions menu to record the script, it should work.

Translate
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
Contributor ,
Aug 01, 2024 Aug 01, 2024

I confirm that this works, thanks! I had no idea you had to use this weird workaround, I expected the action to just record any menu item I was using...

 

I now have a shortcut to rename the thousands of "copy 1" and "copy 2" objects in my layers panel, that I didn't want appended upon copying in the first place.

Translate
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 ,
Aug 01, 2024 Aug 01, 2024
LATEST

Good to hear it works now. 

Translate
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