Skip navigation
Pete.it
Currently Being Moderated

Need help automating something in InCopy

Mar 9, 2012 10:54 AM

A few of our editors are looking for a way to have a predetermined line of text added to a story via a shortcut key. For example "if you would like to comment please write us at example@eg.com". We are using XP pro and InCopy CS5. I'm not familiar with scripting but if there is a way to do it using scripts I am not opposed to learning it.

 
Replies
  • John Hawkinson
    5,572 posts
    Jun 25, 2009
    Currently Being Moderated
    Mar 9, 2012 11:01 AM   in reply to Pete.it

    This one-line script does that:

     

    app.selection[0].insertionPoints[0].contents="if you would like to comment please write us at example@eg.com";

     

    Then, you can assign it a key in Edit > Keyboard Shortcuts in the Scripting area.

     
    |
    Mark as:
  • Currently Being Moderated
    Mar 9, 2012 12:48 PM   in reply to Pete.it

    There is no need for a script for that. The built-in Text Macro feature does exactly what you're asking about. It's a place where you can add "boilerplate" text and recall it by double-clicking its entry on the Text Macro panel, or using a keyboard shortcut (which you add in the Text Macro pane, not Edit > Keyboard Shortcuts), or by typing a macro code of your own devising right in the text, like an auto-expand code.

     

    Just type out the text you want to turn in to a Text Macro, select it, and click the New Macro button in the Window > Text Macro panel. You can choose your macro code and/or a keyboard shortcut there, and you can choose whether or not to retain the formatting (text style) of the selection.

     

    There is no size/length limit to the macro. It could be a simple expansion of an acronym, a sentence (like you want), a paragraph (like an author bio or your address), or an entire story.

     

    Details here: http://help.adobe.com/en_US/incopy/cs/using/WSa285fff53dea4f8617383751 001ea8cb3f-72bda.html

     

    ... or in any of my InDesign/InCopy Workflow videos on Lynda.com

    http://j.mp/lynda_amc

     

     

    AM

     
    |
    Mark as:
  • Currently Being Moderated
    Mar 9, 2012 12:52 PM   in reply to AnneMarie Concepcion

    Just a +1 for anyone lurking on AM’s Lynda.com videos. Short of having her in the room with you, it’s about the best stuff you’ll find.

     

     

     

    At $25/month you can’t go wrong.

     

     

     

    Bob

     
    |
    Mark as:
  • John Hawkinson
    5,572 posts
    Jun 25, 2009
    Currently Being Moderated
    Mar 9, 2012 2:33 PM   in reply to AnneMarie Concepcion

    There is no need for a script for that. The built-in Text Macro feature does exactly what you're asking about. It's a place where you can add "boilerplate" text and recall it by double-clicking its entry on the Text Macro panel, or using a keyboard shortcut (which you add in the Text Macro pane, not Edit > Keyboard Shortcuts), or by typing a macro code of your own devising right in the text, like an auto-expand code.

    Oh, that's a good point! I somehow always forget about this feature because it strangely does not exist in InDesign.

    It's  the better bet here!

     

    Sorry about that.

     
    |
    Mark as:
  • John Hawkinson
    5,572 posts
    Jun 25, 2009
    Currently Being Moderated
    Mar 12, 2012 9:27 PM   in reply to Pete.it

    The macro function is easier to manage. It's easier to edit, in a panel, and it's easier to handle multiple items and see what they are. It also handles text attributes much better -- if you want to have italics, boldface, or other attributes, they require complicating the script substantially, but the Text Macro feature just handles them.

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points