The following tip will take you through Script installation, running scripts, assigning a keyboard shortcut to a script and reviews the sample script “CornerEffects.jsx”. With the installation of Adobe Creative Suite 3 or InDesign CS3, a series of sample scripts, ready for use are installed.  In the previous version of InDesign you would have had to locate these sample scripts either on your Resources Disk or on your Installers disk somewhere and copy them to the Scripts directory.

Scripts panel

067-01.png

Access the Scripts panel from Window > Automation. And twirl open the arrow in front of Application, Samples and JavaScript and you’ll see a list of the scripts displayed.

If you’re on a Mac you’ll also see the same set of scripts in an AppleScript directory. On a PC a VBScript directory. AppleScripts and VBScripts are native to their respective operating system, JavaScripts are shared and used across platforms.

Scripts are installed at Application level or User level.  Application level scripts are accessible to all users logging into a workstation, User level scripts are only accessible to the user who’s installed them.

Installing Scripts

To navigate to the install locations of either Application or User level scripts, right-click the folder name in the Scripts panel and select Reveal in Finder/Explorer. Double click the Script Panel folder to open it. Copy new scripts to this folder. Either copy them to their own folder so that the Scripts Panel displays them in a more organised manner or drop them straight into the Scripts Panel folder.

067-02.png

To Run A Script, either double click the script name in the Script panel or select the script, then select Run Script from the panel menu.

The CornerEffects script

CornerEffects, renamed  Corner Options in InDesign CS3, are the round, bevel, inverse rounded etc. corner settings you can apply to objects, normally by using the Object > Corner Options… command.  This command applies the selected option to all corners of the selected object.

This is where the CornerEffects script comes in handy 🙂

067-02a.png

It is build around the assumption that you are applying it to a rectangular 4-cornered object and allows you to select which corners you’d like to apply a corner effect to.

To run the script you must first select the rectangular object. Next Run the Script.

067-02b.png

The CornerEffects dialog appears, allowing you to set the Corner Type and Offset option and Pattern.  With the Pattern option you can select which of the corner(s) is going to have the Corner Option (effect) applied to it.  I’m opting to apply selected settings to all even corners.

067-02c.png

You could achieve a similar result using the PathFinder commands by adding different shapes together, but this script is definitely the quikest way to get from ‘A’ to ‘B’ 🙂

If it is a script you intend using a lot, consider assigning a keyboard shortcut to it.

Assigning keyboard shortcuts to scripts

To assign a keyboard shortcut to a script, access Keyboard Shortcuts from Edit menu. If you’ve not yet created a custom Keyboard Shortcut set, start by creating a New Set.

Note: When using InDesign CS3 you will be prompted to create a new set when you try to change a shortcut when no custom set is active. This is because you can not override the [Default]. Earlier versions of InDesign would just update the [Default] set if you didn’t create a new set first. As this file doesn’t reset itself when you delete application preferences, it’s best practice to create a new set first, based on the [Default].

067-03.png

Click New Set and name your set, I’m basing my set on the [Default] so it adopts all of InDesign’s standard shortcut settings.

067-04.png

Click OK to create the new shortcuts set.

067-05b.png

Next set Product Area to Scripts and scroll down to the CornerEffects.jsx script. Place your cursor in the New Shortcut box and press the keyboard shortcut you’d like to assign to this script. If the shortcut is already assigned to another command you’ll see that command listed as “Currently Assigned to:”. Although you can use the same shortcut in different Context (Text or Tables), be aware that in same context you’d be overriding the previous shortcut. So best to look for one that is [unassigned].

Click Assign, then click Save to save the shortcut set changes, next click OK to close the dialog.

Note: if you don’t “Save” the shortcut set changes and InDesign Quits/Exits unexpectately due to a crash, you’d loose the amendments you’ve just made, as the new settings aren’t saved until you Quit/Exit InDesign normally.

Applying CornerEffects Script on a polygon

Did I say earlier that the CornerEffects.jsx script is assuming your object has 4 corners?  Well that is true, but try applying “Even” or “Odd” points only to a starburst that has an even number of points. You can now access the CornerEffects.jsx script using your newly assigned shortcut 🙂

067-06.png

Gives a nice visual effect.  If you’re interested in playing with starbursts, be sure to also look at my earlier tip: Bursting stars with Scaling and Corner Effects.

Video Tutorial