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

[TUTORIAL] ADD YOUR OWN KEYBOARD SHORTCUTS TO YOUR JSX SCRIPTS

Community Expert ,
Nov 08, 2010 Nov 08, 2010

This is for Windows only; it uses a feature to launch your favorite software via a keyboard shortcut. It’s been here for a while but it just never occurred to me to use it for this purpose.

1.       Create a shortcut on the Desktop that points to your script.

2.       Assign a keyboard shortcut to it. That’s it!!!!

If you don't know how, here’s a step by step

1.       Open the folder where all your scripts live

2.       Right click on any of them and click on “Send to …” -> “Desktop (Create Shortcut)”

3.       (Optional) Rename the shortcut; to help you remember it is a good practice to include the actual key combination

4.       Right click on the shortcut, click on “Properties”

5.       The Shortcut Key says “None”, place the cursor there and hit for example Ctrl+Alt+8

6.       Click on “Apply” then on “Ok”

7.       That’s it, go to Illustrator and hit your key combination.

scriptShortcut.png

Notes:

1.       Add the following line to the beginning of all your jsx scripts “#target Illustrator” (without the quotations)

2.       If there are duplicate key combinations, your newly created shortcut will take precedence over any existing Illustrator shortcut used for something else, so…to help you see what key combos are available:

          1.       In Illustrator, go to “Edit” -> “Keyboard Shortcuts…”, then click on “Export text…”

          2.       The file is saved as a text delimited, open it with Excel or similar program to be able to sort

          3.       This is what I get, a sorted list that easily shows what’s available

sortedShortcutList.png

3.       If you have lost of scripts, your desktop will soon be overcrowded with icons, which many people really hate. An alternative could be to create a shortcut to the folder containing all your scripts and assign a key combination. When you’re in Illustrator and use the key combo the folder will open and you will have to double click on the file to run it. Not ideal….but your desktop will be uncluttered and is still better that going to the menus to run your scripts.

any comments or questions are welcomed

TOPICS
Scripting
5.9K
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
Adobe
Explorer ,
Nov 10, 2010 Nov 10, 2010

Excellent tutorial, but I followed a slightly different path - I did it using AutoHotkey (inspired by your description).

But I always get a dialog box when I trigger a script - "do you really want to run this script?" (or something like that)

I can live with that - but is there a way to get rid of that?

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 ,
Nov 10, 2010 Nov 10, 2010

thanks, is it a Windows warning? I don't have AutoHotkey installed but it sounds like it is a Windows security warning, do you see a check box that prevents the warning from showing again?

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
Explorer ,
Nov 11, 2010 Nov 11, 2010

Carlos - it is not a windows security warning, and there is no checkbox. This is coming from extendscript (it has that icon when you alt-tab). Windows doesn't know that this is a script, the OS just launches extendscript with the file as an argument.

The text is:

You are about to run a script in Adobe Illustrator CS5. You should only run scripts from a trusted source. Do you want to run the 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
Enthusiast ,
Nov 12, 2010 Nov 12, 2010
LATEST
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