Site Info

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


Advertisements



« | Main | »

Using Scripts in InDesign, CornerEffects

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

Topics: Adobe, InDesign, digitip, podcast, scripting | 17 Comments »

17 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)

  5. Graham Appleton says:
    October 8th, 2008 at 8:20 pm

    Hi Cari,
    In the past i have found your site really helpful and for this reason I wondered if you may be able to assist in some way? I have a Script error each time I open InDesign CS2 – it reads:
    “Error in C:\Program Files\Common Files \Adobe\Startup Scripts\bridge:jsx.
    Line 46: is Highest Bridge Version = true;
    Timeout while waiting for the engine”
    Then if I hit ENTER, the program starts and is OK.
    Do you have any ideas why this may be and what i could do to rectify it? Many thanks – Graham.

  6. Heera Alam says:
    November 14th, 2008 at 5:20 am

    Hi
    Nice corner Effect with scripting i never thing this type of effect.

  7. Drew Eastmead says:
    February 19th, 2009 at 1:20 am

    These are fantastic! Is there a way to undo or remove the corner effects at a later time? Let’s say I add a bevel effect but later want to change it to a rounded corner. Do I have to start over, or can I modify the effect/script? Thanks!

  8. Cari Jansen says:
    February 19th, 2009 at 3:39 am

    Hi Drew,

    When you’ve run the script, probably the easiest way to rest the shape to a rectangle again is by using the following command: Object > Convert Shape > Rectangle. That would reset the rectangle that was amended by running the script to its original shape.

    Hope this helps.

    Cari

  9. Jason Stancombe says:
    February 24th, 2009 at 11:25 am

    Hi Cari,
    This is a great tip. I have been using indesign for years and only just found out about the scripts palette – thanks.

    Is there a way I can make this script part of an object style, so that I can apply a style to a square edged rectangle – rather than enter new parameters for each individual object?

  10. Brian D says:
    May 6th, 2009 at 12:33 am

    I can’t thank you enough, seriously, I design on a regular basis, and one area I was lacking in was creating good masks, etc. This explanation saved me so much time, stress, and improved the quality of my most recent project. Thank you so much Cari!

  11. Cari Jansen says:
    May 7th, 2009 at 11:04 pm

    Thanks for the kind words Brian :)

  12. Liju John says:
    November 16th, 2009 at 7:10 pm

    Do any one know, How to give shortcut to a menu item or an item in scripts panel item in indesign using VB Script?.

  13. thang8843126 says:
    June 25th, 2010 at 9:49 am

    How to call the Find/Change Dialog by Script?
    Thanks

  14. Cari Jansen says:
    July 1st, 2010 at 3:44 pm

    @thang … if you wait a short while, there will be a very cool plug-in available for InDesign CS4 and CS5 that can do just that… for a preview check-out: http://www.youtube.com/watch?v=NHWMw3qH-s8

  15. Natalie Timmons says:
    July 2nd, 2010 at 5:30 am

    is there a way to use this scripts in order to created rounded cells in a table?

  16. Cari Jansen says:
    July 5th, 2010 at 8:58 am

    @Natalie

    Not that I know of, but if you create a shape that is correct first, you can cut and paste a table inside the shape and ‘fake’ the round corners on the table that way :-)

    Cari

  17. Cari Jansen says:
    August 11th, 2010 at 9:13 am

    @Natalie Not on the tables cells itself, but you could mimic a table with rounded corners by copying and pasting the table into a frame that has its corners rounded as a work-around.

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.