Site Info

This web-site is created and maintained by Cari Jansen, Perth, Western Australia.

Subscribe


Recent Posts


Topics


Archived Posts



« Adobe spies? - Myth busted | Main | Glossary of Typographic Terms »

Using Scripts in InDesign, CornerEffects

By Cari Jansen | January 13, 2008

Digitip 067 - Adobe InDesign CS3

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

View movie (8Mbfile size)

podcast
Also available in iTunes via subscription to podcast. Right-click the podcast icon, then select ’save shortcut’ and paste this into the subscription to podcast menu in iTunes.

Topics: adobe, digitip, indesign, podcast, scripting |

4 Responses to “Using Scripts in InDesign, CornerEffects”

  1. Gary Spedding says:
    January 14th, 2008 at 5:40 am

    Cari. Nice, thankyou. I only just noticed the link to the video versions here today but have checked out the last two now.

  2. Cari Jansen says:
    January 14th, 2008 at 9:41 am

    Videos have been a ‘non-event’ for a while, but am trying to add them again every now and again. If you look at category “Podcast” on my site, you’ll find more of them :)

  3. boris says:
    February 16th, 2008 at 4:49 pm

    I too have received interesting effect when have applied a script to octagonal star without fill, (stroke=0,5) then many times copies the turned out figure with turn in 5 degrees. Why and not add in a script of an options of recurrence nnn times with turn on xxx degrees?

  4. boris says:
    February 16th, 2008 at 4:57 pm

    I have forgotten to tell, that I have placed all set of figures in one general center (Align vertical centers + Align gorizontal centers)

Comments

Trademarks: Adobe, the Adobe logo, Acrobat, Creative Suite, Illustrator, InDesign, Photoshop, PostScript are trademarks of Adobe Systems Incorporated.

Disclaimer: While every precaution has been taken in the preparation of this web-site, the creator shall not have any liability to any person or entity with respect to any liability, loss, or damage caused or alleged to be caused directly or indirectly by the information or instructions contained in this web-site, or by the computer software and hardware products described therein.