Fan of creative technology, elearning, instructional design and a little geeky

Using Scripts in InDesign, CornerEffects

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

Similar posts
  • Adobe InDesign and XML: A Reference Guide The following is a reference guide I have compiled over time for those of you who are looking at doing a little more with XML in InDesign (originally published Feb. 2011, last updated Feb 2018). If you have any extra information you’d like to see added to this guide, feel free to message me. Mapping XML tags to InDesign [...]
  • How to change the colour of bullet points in InDesig... A few weeks ago I recorded a short quick tip tutorial. InDesign’s Control panel, gives users a quick and easy way to format text as a bulleted list. Highlight the text, and click the Bulleted List button in the Paragraph Formatting Controls mode for the Control panel. This applies a universal bullet character as the [...]
  • Creating a pop-up window in a PDF with Adobe InDesig... In the following YouTube tutorial, we’ll create an interactive PDF from Adobe InDesign, in which we click on a button, which in turn opens up a simple pop-up window containing a close-box. When the close-box is clicked the pop-up window disappears [...]
  • InDesign: Facing pages with odd-numbered left pages Back in 2004 I wrote a tip for InDesign CS on how you could have the first page of your document be a left page AND have it start with page number 1. It’s hard to believe this is almost a decade ago… But a recent question on Facebook, made me think I should really [...]
  • Negative Lookbehind – GREP for Designers This is the fourth and final blog-posts in a series of posts on lookaheads and lookbehinds in GREP, written after speaking at the Perth InDesign User Group. My speaker notes are also available: What is GREP? (PDF download) (2.4Mb). In the previous three posts I briefly introduced GREP, and we took a look at Positive [...]

27 Comments

  1. May 10, 2013    

    @iriskat as far as I know, the script needs to be written so that it works with a book file. In other words, it would run on all the documents in the book panel. If the script you are working with doesn’t have that enablement, you’ll have to open each file separately, or it might work on all open documents… it really depends on the script if this works. — Cari

  2. Iriskat Iriskat
    May 6, 2013    

    Thanks for the description and I appreciate you being around to comment! Can you please tell, if I want to run a script on an entire Book file (indb), how do I do it, as opposed to running a script on a single Indd file?

  3. February 24, 2013    

    @Shaker : Have you tried uninstalling the scripts and reinstalling them? What exactly is it that is not working anymore?

  4. shaker noor shaker noor
    February 19, 2013    

    I am a designer working on Adobe InDesign ? Scripts disrupted and I do not know how fix it, not work with me

  5. March 20, 2012    

    @Tony Thanks for that 🙂

    Did you know that InDesign CS5+ has Live Corner Options, that you can assign to an Object Style, so might be worth the upgrade for future projects 🙂

    You can change the corner settings globally that way AND you can resize the objects without distorting the corners 🙂

    Pretty cool stuff.

    — Cari

  6. Tony Tony
    March 20, 2012    

    Thanks Cari, this has just saved me several days work.

  7. July 27, 2011    

    I am facing some problem with InDesign CS4

    one new script development “Folder and files should not be highlighted” all batches

    or

    one new script development “Naming in Paragraph and Character styles should be lower case

    Please sent me ID: sanju.ys@gmail.com

  8. Jon Jon
    April 28, 2011    

    Many thanks for your post, it made my day (and saved me an hour !)

  9. April 2, 2011    

    Hi Laura,

    If you have applied a corner effect using the script (in InDesign CS5 you no longer need to use a script for this by the way), and want to ‘undo’ this, then the easiest way to go back to the original rectangle is to select the shape and choose Object > Convert Shape > Rectangle.

    Hope this helps.

    Cari

  10. laura laura
    April 1, 2011    

    how do I removed an effect enter with an action script?

  11. Cari Jansen Cari Jansen
    July 5, 2010    

    @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

  12. Natalie Timmons Natalie Timmons
    July 2, 2010    

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

    • Cari Jansen Cari Jansen
      August 11, 2010    

      @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.

  13. Cari Jansen Cari Jansen
    July 1, 2010    

    @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

  14. thang8843126 thang8843126
    June 25, 2010    

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

  15. Liju John Liju John
    November 16, 2009    

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

  16. Brian D Brian D
    May 6, 2009    

    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!

    • Cari Jansen Cari Jansen
      May 7, 2009    

      Thanks for the kind words Brian 🙂

  17. February 24, 2009    

    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?

  18. February 19, 2009    

    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!

    • Cari Jansen Cari Jansen
      February 19, 2009    

      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

  19. November 14, 2008    

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

  20. Graham Appleton Graham Appleton
    October 8, 2008    

    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.

  21. boris boris
    February 16, 2008    

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

  22. boris boris
    February 16, 2008    

    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?

  23. Cari Jansen Cari Jansen
    January 14, 2008    

    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 🙂

  24. Gary Spedding Gary Spedding
    January 14, 2008    

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

Leave a Reply

Your email address will not be published. Required fields are marked *