Shortcuts for placing text in brackets

Is there a way to easy place text in brackets in Indesign? I have a lot of text where some word need to be placed in brackets and would like to just highlight the word and use a shortcut to place it in brackets.

Save this short Javascript in your User Scripts folder:
app.selection[0].insertionPoints[-1].contents = ')';
app.selection[0].insertionPoints[0].contents = '(';
app.selection[0].characters.itemByRange(0,app.selection[0].length-2).select();
You can assign a shortcut key to it the usual way.

Similar Messages

  • Shortcut for Fit text on Box?

    Hi guys,
    Is there any way or shortcut for Illustrator CS 5 to Fit Texts as the same lenght of the Box Frame? This is a image sample
    http://www.pixentral.com/show.php?picture=1PwekCEGe3qN6mrq24V3UHC86svK8
    i have a shortcut in InDesign to do this and it is very useful when aligning differente text frames. If the frame does not fit its text content the alignment is not right. I know i can do it by hand, but when you have many blocks is way time consuming.
    Any help or ideas?
    Cheers,
    S

    On the other hand, it is nice the script adjust to the text frame but i guess it would be nicer if the fit would adjust to the right lenght of the text.
    "Length" should be avoided when describing dimensions. It can be interpreted as either horizontal or vertical. Use "height" and "width", not length. Better still, explicitly state horzontal or vertical.
    What would be nicer is for Adobe to take a look at its other vector drawing program (FreeHand) and discover a far superior interface for text objects. Then trash Illustrator's entirely ill-conceived, cumbersome, unintuitive, and limited "Area Type" vs. "Point Type" distinction.
    Enable the user to set any text object to auto-expand and auto-fit its contents either horizontally or vertically. FreeHand users have been able to do this to any text object with a mere double-click for decades. This can also be set to all the text objects in the document at once--a huge advantage for avoiding accidental overset text in map projects where hundreds of street labels are subject to the risk.
    InDesign needs this almost as badly.
    JET

  • Change shortcut for committing text

    Does anyone know the name of the "command" I should change in the Keyboard Shortcuts window for committing text?  This is normally ESC in InDesign but I'd like to change it to what Photoshop uses (command+return or enter).  Thanks!

    ESC is the default shortcut for changing to the Selction Tool when the Text tool is active in ID. I don't think I've ever heard anyone use the term "committing text" with InDesign.
    If you want to change it, Edit > Keyboard Shortcuts... and change the product area to Tools, then scroll down.Cmd + Enter is the default for opening Quick Apply, but you can reassign it, or use something else, like Opt + Enter, which is unassigned.
    Keep in mind that Text in ID is far more sophisticated and complex in ID than it is in Photoshop, and you have a lot of additional text commands availble.

  • How do I create a keyboard shortcut for compressing text?

    I am in a prepress situation where we build print advertisements.
    The company has just gone over to Indesign from Quark.
    I would like quick access to text compression similar to Quark's 'Ctrl ['.
    I can't find the facility to compress in 'Edit/Keyboard Shortcuts/Type'.

    - Navigate to Adobe InDesign's "Edit" menu and select "Keyboard Shortcuts." The Keyboard Shortcuts dialog box comes up on your screen.
    - Click on the "Set" pop-up at the top of the Keyboard Shortcuts dialog box. Choose "Shortcuts for QuarkXPress 4.0." Now click "OK." That's all you have to do to make Adobe InDesign behave more like QuarkXPress.
    - Attempt to use a QuarkXPress shortcut and you find your familiar hands-on environment within Adobe InDesign. This saves you time by letting you leverage the value of your experience in a new software package.
    - Return to the "Edit" menu and choose "Keyboard Shortcuts" again if you prefer the keyboard commands from QuarkXPress but always wanted to change one or more of them. Don't try to edit the shortcuts in the "QuarkXPress 4.0" set  itself. Instead, click the "New Set" button. In the window that comes up, type a distinctive name for your new shortcut set. Choose "Shortcuts for QuarkXPress 4.0" from the "Based on Set" pop-up. Now click "OK." The "Product Area" pop-up  helps you assign new shortcuts to as many menu items as you wish. (If you try to assign a shortcut that's already in use, you see the conflict listed at the bottom of the dialog box.) When you've finished your changes, click "OK" to use your  new settings.
    - Test your new shortcuts

  • Can I create a keyboard shortcut for changing text colors in Mail?

    When composing an email in Mail (v5.2), I often have the need to change the text of a few words to red to highlight them (e.g. names of people assigned to an action item) but want to do it via keyboard shortcut.  I know I can do the following:
    Press Command-Shift-C brings up to Colors panel
    Choose the color (e.g. Red) with my mouse
    Type the text
    Choose the color (e.g. back to Black) with my mouse
    Continue typing text
    And that's if I want the color panel to stay visible (add at least 3 more steps all together if I close it in the interim).
    I've tried using keyboard shortcuts to assign a color (couldn't find the right menu path) and Automator to create a script (the color panel always has to be in the right location which it may not be). None of those techniques work.
    It's an annoyance more than anything else but I imagine it should be possible.
    Thanks for any assistance!
    John

    Not only is this very possible, it's also very easy. You can do this not just for Quark but for any application in OS X. To accomplish what you want, do the following:
    * Firstly, quit QuarkXPress completely. The rest of the steps won't work if it is still running.
    * Go to the Apple menu and select System Preferences.
    * Click the Keyboard & Mouse System Preference Pane
    * Click Keyboard Shortcuts
    * Click the + button to add a new shortcut.
    * Select QuarkXPress as the application.
    * In the Menu Title field type "Place Name" exactly like that but without the quotes.
    * Click inside the Shortcut field and type the key combination you want to use for this shortcut. I suggest using Command + one of the F keys, like Command+F1.
    * Click Add.
    * Close System Preferences
    * Run Quark, open a document, and try it out!
    Robert

  • No shortcut key for "Add Text" tool?

    we have shortcuts for comment tool (S), textbox tool, but why not one for Add text tool? or did i miss it out? I'm on acrobat XI pro right now.please advise!    

    ah yes, you're right.
    this brings me to another question. in previous versions of acrobat, when in hand tool or selection mode (v), i can just double click on MY own typed text (not comments) to add on/modify my contents. however, nothing happens when i double click now. i can highlight my text but can't delete it, nor can i add anything to it.
    a prompt comes up and tells me to use the text edit tools. when i tried using the text insert tool, it simply adds a popup comment to my text, instead of editing the text that i wrote.
    i just realized i could hit "Edit text and images" button that reveals all the textboxes, then i can edit the text. again that has no shortcut, and is one step more than what i usually would do.
    what can i do to revert this behavior to the old versions?    if not, what would be the shortcut for edit text+images?

  • Shortcut for moving between Panels on Modal Dialog boxes eg: Cell Options (OS X)

    Is there an existing shortcut for moving between the tabs of modal dialog boxes. For example Cmd+Opt+'B' brings up Cell Options dialog but that is actually the shortcut for the "Text" Panel how can I navigate (using keyboard keys) to the other Panels {"Strokes and Fills", "Rows and Columns", "Diagonal Lines"}.
    Note:
    I realise I can create shortcuts for the Table…> Cell Options…> Diagonal Lines items but these shortcuts will not work in the context of the Cell Options Modal Dialogue box.

    Hey Thanks.
    For those who come looking b/s they had the same question:
    As a bonus once one of these key sequences is pressed the tab heading area comes into focus so the arrow keys work for navigating tabs. So even for long list of Paragraph Style tabs which number greater than 10 still easy to navigate to them eleventh to someteenth ones.

  • Keyboard shortcuts for text selection not working in Flash CC

    In the new Code Editor in Flash CC running on Mac OS X, most standard Keyboard Shortcuts for traversing through the text work as expected (as the Operating System works globally) but there is one that doesn't and it's I think the most important one.
    Hitting "OPTION + SHIFT + [right or left arrow keys]" to select words doesn't work. Hitting "OPTION + [right or left arrow keys]" works as expected, moving the cursor to the next word or break point, but adding shift doesn't do the selection.
    I don't understand why this changed since it's a basic OS global shortcuts, and every other program behaves the way it should. Flash CS6 running on the same system behaves fine, but Flash CC doesn't. If you have ever written code, you know that any second that a programmers hand doesn't have to leave the keyboard to search for the mouse is invaluable, and this has forced me to stop using Flash CC and use Flash CS6 to edit my Action Script classes becuase it's unusable otherwise.
    These shortcuts are also not listed in the keyboard shortcuts for the program, so I can't change the default behavior. Does anybody know if there's a way to set it back to the way it was before, or just disable special text shortcuts so that selecting text behaves like any other application in the operating system?
    System Configuration:
    Flash CC
    Mac OSX 10.8.5

    Amy~ Yep the lasso tool was what I verified with another user. 'L' seems to be bound indefinitely to loop through different types of lasso tools and it was annoying them because they just wanted L to be the regular freehand lasso. I removed 'L' from being an option on the polygon lasso and even set it explicitly to SHIFT+L as well as set the lasso tool to a completely different keyboard combo. 'L' still cycled through lassos haha. It needs some fixes.
    fertolg~ At least you have a workaround for now. I'd go nuts if I couldn't use keyboard text selection writing code, oy! You're welcome and if you're all set please mark correct so we can filter unanswered. Good luck!

  • Woes placing text; need benefit of your experience! [CS4 + JS]

    Hi-- I'm working on a routine for importing a number of text documents into InDesign, but have come up with odd behavior when placing text. I'm working with ID CS4 & javascript; all the actions perform the same when doing them manually.
    I start with text--actual unformatted text originating from a Word document, but saved as a text file--and with the text tool place it at the cursor position in a paragraph in 'body text' style; the text picks up formatting different than the style, namely the font from 'Headline' style, although pt size & leading are still 'body text' style.
    Yet when I cut the same text from a text editor, then paste it at the cursor position, the text appears as I expect, in body text style with no overrides.
    This is a small improvement: When I first tried placing the text,  it had been coming in with a character style applied. I noticed that the character style being applied was selected in the Quick Apply menu. Un-selecting the character style in the Quick Apply got me to where I am now.
    It's driving me nuts that I still can't figure out where the Headline-style font is coming from! Any pointers?
    Thanks in advance...
    Daniel
    p.s.: I'm trying the text import angle to avoid other problems I'd been having importing Word documents, namely importing any Word97-2003 document with highlighted text would crash ID, Word character styles adding direct formatting to the text in ID, etc.

    As promised, here is the code, as it stands, for whatever help it can be. The code is specific to my particular uses, but the approach of tagging various direct/character styles from Word, wiping all formatting then reapplying ID styles and removing the tags may be useful.
        ConvertWordBrute.jsx
        Problem: importing from regularly styled Word templated documents to CS4 can be a mess. Even if import presets are exactly set,
        if the Word doc has character styles, text can come in with layered character styles. Applying correct character styles and then
        removing  overrides won't fix because character styles and direct formatting are layered on every bit of text and formatting is not
        at all standard. To fix, all character styles AND overrides must be removed to wipe out the strangeness. This script shows one approach
         to keep italic, bold and bold italic direct formatting, and perhaps other stuff to preserve what the writers intended.
        The approach: tag formatting outside of ID's usual facilities, wipe all formatting clear, then apply the proper styles & character styles.
        Presumes:
            --A word import preset has been set...
            --Will need to trap for missing fonts? (e.g. Windings Bold, which is faked in Word; doesn't actually exist!)
            Left @: Works reasonably well. Probably should be run on before layout has sections.
            --Document includes a paragraph style named "Body Text"
    * @@@BUILDINFO@@@ ConvertWordBrute.jsx !Version! Thu Oct 11 2011 10:52:08 GMT-0700
    #script "ConvertWord"
    #target "InDesign"
    main();
    function main(){
        try {
            var docRef = getActiveDocument();
        } catch (e) {
            alert (e);
        var confirmWarning = "Note: bold, italic and bold-italic will be turned into character styles, then this script clears all overrides--" +
            "any character spacing applied outside of regular paragraph and character styles will be erased--OK?";
        var myConfirm = confirm(confirmWarning, true, "Text change alert!");
        if (myConfirm == false){
            return;
        var jumpTextCharStyle = "Body jump text";
        var jumpLineChars = 30;
        //saveTextReflowState & turn it off to avoid adding pages...
        var smartTextReflowState = docRef.textPreferences.smartTextReflow
        docRef.textPreferences.smartTextReflow = false;
        //Apply HTML-like tags to text with formatting you want to keep
        //what you search here depends on how your import preferences were set... did you map incoming word styles? to what? Normal -> Body Text?
        tagFormattedCharacters(docRef, "Body Text", "Bold" , "b");
        tagFormattedCharacters(docRef, "Body Text", "Italic" , "i");
        tagFormattedCharacters(docRef, "Body Text", "Bold Italic" , "bl");
        tagFormattedCharacters(docRef, "Normal", "Bold" , "b");
        tagFormattedCharacters(docRef, "Normal", "Italic" , "i");
        tagFormattedCharacters(docRef, "Normal", "Bold Italic" , "bl");
        tagFormattedCharacters(docRef, "Body Text indent", "Bold" , "b");
        tagFormattedCharacters(docRef, "Body Text indent", "Italic" , "i");
        tagFormattedCharacters(docRef, "Body Text indent", "Bold Italic" , "bl");
        cleanupTags(docRef);
        //Convert Word styles to ID styles, then wipe Word styles
        convertWordStyles(docRef);
        //Re-apply all paragraph styles with no overrides or character styles
        formatTaggedCharacters(docRef, "b", "Bold")
        formatTaggedCharacters(docRef, "i", "Italic")
        formatTaggedCharacters(docRef, "bl", "Byline")
        // Replace jump lines character style, since above makes all bold-italic into Byline style
        formatJumpLines(docRef, jumpLineChars, jumpTextCharStyle);
        //re-instate text reflow
        docRef.textPreferences.smartTextReflow = smartTextReflowState;
    function getActiveDocument(){
    //returns reference to active document; otherwise undefined
        //if a variable is not assigned a value, its value is undefined
        if (app.documents.length == 0) {
            throw ("No documents open");
        //returns value for variable docRef back to call statement
        var docRef = app.documents.item(0);
        return docRef;
    function tagFormattedCharacters(docRef, paragraphStyle, fontStyle, fontTag) {
        // Searches for characters in paragrapfStyle, fontStyle in docRef, enclosing any characters found
        // in HTML-style angle-bracket tags containing fontTag
        var myStyles, s, stylesRE;
        //First chk if passed paragraphStyle exists
        for (var s = docRef.paragraphStyles.length-1; s >= 2; s--) {
            //get a list of pipe-separated styles, but not the default styles in brackets, since they'll screw up a RegExp pattern
         myStyles = docRef.paragraphStyles[s].name + "|" + myStyles;
        stylesRE = new RegExp(myStyles);
        if (!paragraphStyle.match(stylesRE)){
            return;
        //Clear the find/change preferences.
        clearFindChangePrefs()
        //Set the find options.
        app.findChangeTextOptions.caseSensitive = false;
        app.findChangeTextOptions.includeFootnotes = false;
        app.findChangeTextOptions.includeHiddenLayers = false;
        app.findChangeTextOptions.includeLockedLayersForFind = false;
        app.findChangeTextOptions.includeLockedStoriesForFind = false;
        app.findChangeTextOptions.includeMasterPages = false;
        app.findChangeTextOptions.wholeWord = false;
        app.findTextPreferences.appliedParagraphStyle = paragraphStyle;
        app.findTextPreferences.fontStyle = fontStyle;
        var myFoundItems = docRef.findText();
        openTag = "<"+fontTag+">";
        closeTag ="</"+fontTag+">";
        //Note: gotta iterate from the end forward, otherwise tag insertions will skew insertion points
        for(i=myFoundItems.length-1; i>-1; i--){
            myFoundItems[i].insertionPoints.lastItem().contents = closeTag;
            myFoundItems[i].insertionPoints.firstItem().contents = openTag;
    function cleanupTags(myObject){
        // To correct for faulty formatting resulting in badly placed tags, e.g.: tags on both sides of paragraph returns.
        // To internalize search routines into this script, it uses a series of searches equivalent to FindChangeByList,
        // captured with RecordFindChange_CS3-CS5.jsx .
        // Note GREP search strings MUST be enclosed in quotes with all internal backslashes & quotes escaped,
        // e.g.: \\ becomes \\\\, findWhat:"( becomes findWhat:\"(
        var myChangesArray = new Array();
        // a few changes to clean up placement of formatting tags which may be funky from Word direct formatting
        myChangesArray[0] = "grep    {findWhat:\"(<[^>]*>)(\\\\s)(</[^>]*>)\"}    {changeTo:\"$2\", changeConditionsMode:1919250519}    {includeLockedStoriesForFind:false, includeLockedLayersForFind:false, includeHiddenLayers:false, includeMasterPages:false, includeFootnotes:false}"; //Nix bolded white space of any kind
        myChangesArray[1] = "grep    {findWhat:\"(<[^>]*>)(\\\\ )(\\\\[)\"}    {changeTo:\"$2$1$3\", changeConditionsMode:1919250519}    {includeLockedStoriesForFind:false, includeLockedLayersForFind:false, includeHiddenLayers:false, includeMasterPages:false, includeFootnotes:false}"; //move spaces (only!) in front of bylines before tag
        myChangesArray[2] = "grep    {findWhat:\"(\\\\r)(</[^>]*>)\"}    {changeTo:\"$2$1\", changeConditionsMode:1919250519}    {includeLockedStoriesForFind:false, includeLockedLayersForFind:false, includeHiddenLayers:false, includeMasterPages:false, includeFootnotes:false}"; //move close tags before graf returns
        myChangesArray[3] = "text    {findWhat:\"<bl>^_</bl>\"}    {changeTo:\"^_\", changeConditionsMode:1919250519}    {includeLockedStoriesForFind:false, includeLockedLayersForFind:false, includeHiddenLayers:false, includeMasterPages:false, includeFootnotes:false, wholeWord:false, caseSensitive:false}";    //Replace em dashes that somehow get bold italic
        findChangeByArray(myObject, myChangesArray)
    function convertWordStyles(docRef){
        // Converts Word styles to ID styles, then wipes Word styles
        // To internalize search routines to this script, this uses a series of searches equivalent to FindChangeByList,
        // captured with RecordFindChange_CS3-CS5.jsx .
        // Note search strings MUST be enclosed in quotes with all internal backslashes & quotes escaped, esp. important for GREP
        // e.g.: \\ becomes \\\\, findWhat:"( becomes findWhat:\"(
        var i, p, stylesRE;
        var myChangesArray = new Array();
        //note: findChangeByArray does not trap for
        myChangesArray[0] = "text    {findWhat:\"^p^t\"}    {changeTo:\"^p\", changeConditionsMode:1919250519}    {includeLockedStoriesForFind:false, includeLockedLayersForFind:false, includeHiddenLayers:false, includeMasterPages:false, includeFootnotes:false, wholeWord:false, caseSensitive:false}"; // remove tabs at the start of paragraphs
        myChangesArray[1] = "text    {findWhat:\"n\", appliedParagraphStyle:\"Heading 1\", appliedFont:\"Wingdings\", fontStyle:\"Bold\"}    {changeTo:\"^8\", appliedCharacterStyle:\"[No character style]\", appliedParagraphStyle:\"Headline 1\", changeConditionsMode:1919250519}    {includeLockedStoriesForFind:false, includeLockedLayersForFind:false, includeHiddenLayers:false, includeMasterPages:false, includeFootnotes:false, wholeWord:false, caseSensitive:false}"; //replace square bullet in Heading 1 Word style to standard bullet Headline 1 + Bold
        myChangesArray[2] = "text    {appliedParagraphStyle:\"Normal\"}    {appliedParagraphStyle:\"Body Text\", changeConditionsMode:1919250519}    {includeLockedStoriesForFind:false, includeLockedLayersForFind:false, includeHiddenLayers:false, includeMasterPages:false, includeFootnotes:false, wholeWord:false, caseSensitive:false}"; // replace Normal paragraph Word style with Body Text
        myChangesArray[3] = "text    {appliedParagraphStyle:\"CallOut\"}    {appliedParagraphStyle:\"Callout\", changeConditionsMode:1919250519}    {includeLockedStoriesForFind:false, includeLockedLayersForFind:false, includeHiddenLayers:false, includeMasterPages:false, includeFootnotes:false, wholeWord:false, caseSensitive:true}"; // replace CallOut Word style with Callout
        myChangesArray[4] = "text    {appliedParagraphStyle:\"Normal Indent\"}    {appliedParagraphStyle:\"Body Text indent\", changeConditionsMode:1919250519}    {includeLockedStoriesForFind:false, includeLockedLayersForFind:false, includeHiddenLayers:false, includeMasterPages:false, includeFootnotes:false, wholeWord:false, caseSensitive:true}"; //replace Normal Indent Word style to Body Text indent
        myChangesArray[5] = "text    {appliedParagraphStyle:\"Body Text\", fontStyle:\"Italic\"}    {appliedCharacterStyle:\"Italic\"}    {includeLockedStoriesForFind:false, includeLockedLayersForFind:false, includeHiddenLayers:false, includeMasterPages:false, includeFootnotes:false, wholeWord:false, caseSensitive:false, kanaSensitive:true, widthSensitive:true, ignoreKashidas:true, ignoreDiacritics:false}"; //replace direct formatted body text italic with character style
        myChangesArray[6] = "text    {appliedParagraphStyle:\"Body Text\", fontStyle:\"Bold\"}    {appliedCharacterStyle:\"Bold\"}    {includeLockedStoriesForFind:false, includeLockedLayersForFind:false, includeHiddenLayers:false, includeMasterPages:false, includeFootnotes:false, wholeWord:false, caseSensitive:false, kanaSensitive:true, widthSensitive:true, ignoreKashidas:true, ignoreDiacritics:false}"; //replace direct formatted body text bold with character style
        myChangesArray[7] = "text    {appliedParagraphStyle:\"Body Text\", fontStyle:\"Bold Italic\"}    {appliedCharacterStyle:\"Byline\"}    {includeLockedStoriesForFind:false, includeLockedLayersForFind:false, includeHiddenLayers:false, includeMasterPages:false, includeFootnotes:false, wholeWord:false, caseSensitive:false, kanaSensitive:true, widthSensitive:true, ignoreKashidas:true, ignoreDiacritics:false}"; //replace direct formatted body text bold italic with Byline character style
        myChangesArray[8] = "text    {findWhat:\" -- \"}    {changeTo:\"^_\"}    {includeLockedStoriesForFind:false, includeLockedLayersForFind:false, includeHiddenLayers:false, includeMasterPages:false, includeFootnotes:false, wholeWord:false, caseSensitive:false, kanaSensitive:true, widthSensitive:true, ignoreKashidas:true, ignoreDiacritics:false}"; //replace space dash dash space with em dash, no spaces
        myChangesArray[9] = "text    {findWhat:\"--\"}    {changeTo:\"^_\"}    {includeLockedStoriesForFind:false, includeLockedLayersForFind:false, includeHiddenLayers:false, includeMasterPages:false, includeFootnotes:false, wholeWord:false, caseSensitive:false, kanaSensitive:true, widthSensitive:true, ignoreKashidas:true, ignoreDiacritics:false}"; //replace space dash dash space with em dash, no spaces
        myChangesArray[10] ="text    {findWhat:\"  \"}    {changeTo:\" \"}    {includeLockedStoriesForFind:false, includeLockedLayersForFind:false, includeHiddenLayers:false, includeMasterPages:false, includeFootnotes:false, wholeWord:false, caseSensitive:false, kanaSensitive:true, widthSensitive:true, ignoreKashidas:true, ignoreDiacritics:false}"; //replace double spaces with single space
        myChangesArray[11] ="text    {findWhat:\"^p^p\"}    {changeTo:\"^p\"}    {includeLockedStoriesForFind:false, includeLockedLayersForFind:false, includeHiddenLayers:false, includeMasterPages:false, includeFootnotes:false, wholeWord:false, caseSensitive:false, kanaSensitive:true, widthSensitive:true, ignoreKashidas:true, ignoreDiacritics:false}"; //Nix double paragraph markers
        // section to put in headline jump reference bullets
        myChangesArray[12] ="grep    {findWhat:\"\\\\>  ?(from \\\\[\\\\d\\\\d?\\\\])\\\\s?\\\\s?$\"}    {changeTo:\" ~8 $1\"}    {includeLockedStoriesForFind:false, includeLockedLayersForFind:false, includeHiddenLayers:false, includeMasterPages:false, includeFootnotes:true, kanaSensitive:true, widthSensitive:true}"//add bullet before end of word, replace space (optional space) 'from [' digit optional digit ']' optional space optional space end of paragraph with space bullet space + the rest
        // Changes any imported paragraph styles to Body Text, imported character styles to None, nukes imported
        findChangeByArray(docRef, myChangesArray)
        removeImportedStyles(docRef);
        // clear overrides, both character & paragraph
        // first set what paragraphs to check
        stylesRE = new RegExp(/Body |Heading /)
        for (i = 0; i < docRef.stories.length; i++) {
            //only mess with stories with a bunch of paragraphs & only paragraphs of Body* or Heading* styles
            if (docRef.stories[i].paragraphs.length > 1) {
                for ( p=0; p < docRef.stories[i].paragraphs.length; p++){
                    if (docRef.stories[i].paragraphs[p].appliedParagraphStyle.name.match(stylesRE)) {
                        docRef.stories[i].paragraphs[p].clearOverrides(OverrideType.ALL);
    function clearFindChangePrefs(){
        //find/change text preferences
        app.findTextPreferences = null;
        app.changeTextPreferences = null;
        //find/change grep preferences
        app.findGrepPreferences = null;
        app.changeGrepPreferences = null;
        //find/change glyph preferences
        app.findGlyphPreferences = null;
        app.changeGlyphPreferences = null;
    function findChangeByArray(myObject, myChangesArray){
        //a shorter version of the supplied FindChangeByList.jsx to allow internalizing search strings
        // Note search strings passed MUST be enclosed in quotes with all internal backslashes & quotes escaped,
        // esp. important for GREP, e.g.: \\ becomes \\\\, findWhat:"( becomes findWhat:\"(
        var myFindChangeArray, myFindType, myFindPreferences, myChangePreferences, myFindChangeOptions, i;
        var myStyles, s, stylesRE, searchOK;
        // Prepare to trap for non-existant styles
        // get a list of pipe-separated styles, but not the default styles in brackets, since they'll screw up a RegExp pattern
        for (var s = myObject.paragraphStyles.length-1; s >= 2; s--) {
             myStyles = myObject.paragraphStyles[s].name + "|" + myStyles;
         stylesRE = new RegExp(myStyles);
        for (i = 0; i < myChangesArray.length; i++) {
            myFindChangeArray = myChangesArray[i].split("\t");
            //The first field in the line is the findType string.
            myFindType = myFindChangeArray[0];
            //The second field in the line is the FindPreferences string.
            myFindPreferences = myFindChangeArray[1];
            // Trap to ensure the style exists
            //The second field in the line is the ChangePreferences string.
            myChangePreferences = myFindChangeArray[2];
            //The fourth field is the range--used only by text find/change.
            myFindChangeOptions = myFindChangeArray[3];
            // Trap for non-existant paragraph styles; ID will choke on searching for a style not in doc
            // Look for paragraph style in find string
            if (myFindPreferences.match(/appliedParagraphStyle/)){
                // & that the search is for a style existing in the document
                if (!myFindPreferences.match(stylesRE)){
                    continue;
            switch(myFindType){
                case "text":
                    myFindText(myObject, myFindPreferences, myChangePreferences, myFindChangeOptions);
                    break;
                case "grep":
                    myFindGrep(myObject, myFindPreferences, myChangePreferences, myFindChangeOptions);
                    break;
                case "glyph":
                    myFindGlyph(myObject, myFindPreferences, myChangePreferences, myFindChangeOptions);
                    break;
    function myFindText(myObject, myFindPreferences, myChangePreferences, myFindChangeOptions){
        //Reset the find/change preferences before each search.
        app.changeTextPreferences = null;
        app.findTextPreferences = null;
        var myString = "app.findTextPreferences.properties = "+ myFindPreferences + ";";
        myString += "app.changeTextPreferences.properties = " + myChangePreferences + ";";
        myString += "app.findChangeTextOptions.properties = " + myFindChangeOptions + ";";
        app.doScript(myString, ScriptLanguage.javascript);
        myFoundItems = myObject.changeText();
        //Reset the find/change preferences after each search.
        app.changeTextPreferences = null;
        app.findTextPreferences = null;
    function myFindGrep(myObject, myFindPreferences, myChangePreferences, myFindChangeOptions){
        //Reset the find/change grep preferences before each search.
        app.changeGrepPreferences = null;
        app.findGrepPreferences = null;
        var myString = "app.findGrepPreferences.properties = "+ myFindPreferences + ";";
        myString += "app.changeGrepPreferences.properties = " + myChangePreferences + ";";
        myString += "app.findChangeGrepOptions.properties = " + myFindChangeOptions + ";";
        app.doScript(myString, ScriptLanguage.javascript);
        var myFoundItems = myObject.changeGrep();
        //Reset the find/change grep preferences after each search.
        app.changeGrepPreferences = null;
        app.findGrepPreferences = null;
    function myFindGlyph(myObject, myFindPreferences, myChangePreferences, myFindChangeOptions){
        //Reset the find/change glyph preferences before each search.
        app.changeGlyphPreferences = null;
        app.findGlyphPreferences = null;
        var myString = "app.findGlyphPreferences.properties = "+ myFindPreferences + ";";
        myString += "app.changeGlyphPreferences.properties = " + myChangePreferences + ";";
        myString += "app.findChangeGlyphOptions.properties = " + myFindChangeOptions + ";";
        app.doScript(myString, ScriptLanguage.javascript);
        var myFoundItems = myObject.changeGlyph();
        //Reset the find/change glyph preferences after each search.
        app.changeGlyphPreferences = null;
        app.findGlyphPreferences = null;
    function removeImportedStyles(docRef){
        // Changes any imported paragraph styles to Body Text, imported character styles to None, nukes imported
       var paraStyle = docRef.paragraphStyles.item("Body Text");
       var noneCharStyle = docRef.characterStyles.item("[None]");
       for(var myCounter = docRef.paragraphStyles.length-1; myCounter >= 2; myCounter--){
         if (docRef.paragraphStyles[myCounter].imported == true ) {
            docRef.paragraphStyles[myCounter].remove(paraStyle); //Replaces w/paraStyle
       for(var myCounter = docRef.characterStyles.length-1; myCounter >= 2; myCounter--){
         if (docRef.characterStyles[myCounter].imported == true) {
            docRef.characterStyles[myCounter].remove(noneCharStyle);
    function formatTaggedCharacters(docRef, fontTag, characterStyle){
        // Searches docRef for text between <fontTag> </fontTag> tags & applies characterStyle
        // then removes the fontTags.
        // For characterStyle = Byline, If found text is greater than jumpTextLen in length, apply jumpTextCharStyle instead
        // First verify the passed charstyle exists...
        // use your standard GREP search & replace
        app.changeGrepPreferences = null;
        app.findGrepPreferences = null;
        // note ? mark in following GREP search string, the non-greedy modifier. Thanks Jongware!
        var myString = "app.findGrepPreferences.properties = {findWhat:\"<"+ fontTag + ">(.*?)<\/" + fontTag + ">\"};";
        myString += "app.changeGrepPreferences.properties = {changeTo:\"$1\", appliedCharacterStyle:\""+characterStyle+"\"};";
        myString += "app.findChangeGrepOptions.properties = {includeLockedStoriesForFind:false, includeLockedLayersForFind:false, includeHiddenLayers:false, includeMasterPages:false, includeFootnotes:true};";
        app.doScript(myString, ScriptLanguage.javascript);
        var myFoundItems = docRef.changeGrep();
        //Reset the find/change grep preferences after each search.
        app.changeGrepPreferences = null;
        app.findGrepPreferences = null;
        //OK, the tags are still there, so wipe 'em
        removeTag(docRef, fontTag);
    function removeTag(docRef, fontTag){
        // Use a GREP search to replace the given tag in docRef; don't mess with styles, as that should've been handled already
        // Reset the find/change grep preferences before each search.
        app.changeGrepPreferences = null;
        app.findGrepPreferences = null;
        var myString = "app.findGrepPreferences.properties = {findWhat:\"<"+ fontTag + ">(.*)<\/" + fontTag + ">\"};";
        myString += "app.changeGrepPreferences.properties = {changeTo:\"$1\"};";
        myString += "app.findChangeGrepOptions.properties = {includeLockedStoriesForFind:false, includeLockedLayersForFind:false, includeHiddenLayers:false, includeMasterPages:false, includeFootnotes:true};";
        app.doScript(myString, ScriptLanguage.javascript);
        var myFoundItems = docRef.changeGrep();
        //Reset the find/change grep preferences after each search.
        app.changeGrepPreferences = null;
        app.findGrepPreferences = null;
    function formatJumpLines(docRef, jumpLineChars, jumpTextCharStyle){
        //  Since previous convertWordStyles() changes all bold italic styled text to Byline char style, change any that are
        //  >jumpLineChars to 'Body jump text' style.
            app.changeTextPreferences = null;
            app.findTextPreferences = null;
            var myString = "app.findTextPreferences.properties = {appliedCharacterStyle:\"Byline\"};";
            myString += "app.findChangeTextOptions.properties = {includeLockedStoriesForFind:false, includeLockedLayersForFind:false, includeHiddenLayers:false, includeMasterPages:false, includeFootnotes:false};";
            app.doScript(myString, ScriptLanguage.javascript);
            var myFoundItems = docRef.findText();
            //Reset the find/change text preferences after each search.
            app.changeTextPreferences = null;
            app.findTextPreferences = null;
            //Note: best to iterate from the end forward, avoiding any potential insertion point skew
            for(i=myFoundItems.length-1; i>-1; i--){
                if (myFoundItems[i].length > jumpLineChars){
                    myFoundItems[i].appliedCharacterStyle = jumpTextCharStyle;

  • Is it possible to make a keyboard shortcut for a specific color for fonts?

    I'm a novice InDesign user and these forums have been a great resource, so thank you for your time.
    I'm doing a very complicated "text art" project and I'd like to be able to change text colors right from the keyboard.
    In Word, one is able to make a keyboard shortcut (to an unused key combination) that would allow you to change text to white, for example and another combination to change it to black, etc.
    I'd love to be able to do that in InDesign without having to mouse over to the color swatch or over to a paragraph style with the text color set.
    Again, thank you in advance!

    For anyone else who has this problem - I actually found out an easy workaround.
    There's another forum that addresses the NumPad issue for MacBooks (http://forums.adobe.com/thread/324960) and I did a modified version for character styles v. paragraph styles per the final comment by Kaj-Ettore.
    ==
    (1) Open text edit and copy the below script (for me it was changing the text to white):
    try{app.selection[0].applyCharacterStyle
    (app.documents[0].characterStyles.item(1),true)}catch(e){}
    Watch the number '(1)' in brackets on the last line: This is the Style number according to the Styles listed in the 'Character Styles' Panel of InDesign (following "[None]").
    Per my setup, "White" is 1 and "Black" is 2.
    SEE SCREENSHOT:
    Decrement the style you'd like to be applied via this script from the styles listed in the InDesign-applet 'paragraph styles'.
    *Note - This Workaround only works for specific Documents – since InDesign links Styles with document templates.
    (2)  Save the Script to:
    %InDesign_Install_Folder%\Scripts\Scripts Panel\Samples\JavaScript\Style(%nmb%).jsx
    or name the file as you like. You'll have to assign a keyboard-shortcut to this and other files later, so it is wise to choose a common and memorable syntax for naming, e. g. numbers or style-names. (I used Style(White).jsx)
    (3)  Repeat this step for every style you'd like to be applicable via a keyboard shortcut...
    This is my "Black" script:
    try{app.selection[0].applyCharacterStyle
    (app.documents[0].characterStyles.item(2),true)}catch(e){}
    Saved as: Style(Black).jsx
    Assign a Shortcut to the Script
    (1)  Open InDesign > Preferences > Keyboard Shortcuts > %YourSetOfShortcuts%
    (2)  Select 'Scripts'
    (3)  Choose the first script you've written, e. g. 'style(body).jsx'
    (4)  Create Shortcuts for Standard- and Text-Environment
    (5)  Repeat for any script you've written
    (6)  Done.
    This worked perfectly for me and I can now use ONE keyboard shortcut (albeit 3 simultaneous keys) to change from black text to white text.

  • How can I set up a custom keyboard shortcut for volume control?

    Hi all,
    I use my black MacBook at work, connected to an external monitor and external keyboard. I'm looking for a way to set up the F buttons on my external keyboard as volume control, just as they do on my laptop keyboard. Looking for F3 to F5 to be volume mute, down, and up, respectively.
    I tried going into Keyboard Shortcuts in System Preferences but since there is no menu item for volume control I can't seem to add it. Anyone know how I can go about doing this or what I'm missing?
    Thanks
    Mike

    paste the following into Applescrpt Editor (it's in /Applications/Utilities)
    <pre style="
    font-family: Monaco, 'Courier New', Courier, monospace;
    font-size: 10px;
    margin: 0px;
    padding: 5px;
    border: 1px solid #000000;
    width: 720px;
    color: #000000;
    background-color: #ADD8E6;
    overflow: auto;"
    title="this text can be pasted into the Script Editor">
    set curVolume to output volume of (get volume settings)
    -- work out the new setting
    if curVolume < 96 then
    set newVolume to curVolume + 5
    else
    -- can't go over 100
    set newVolume to 100
    end if
    -- and apply it
    set volume output volume newVolume</pre>
    this script will increase volume by 5 (out of 100) any time you run it. you can adjust this of course. save the script somewhere.
    You can use a 3rd part app launcher to bind a keyboard shortcut to it. I use Butler. there are many others: Quicksilver, ikeys, quickeys, Spark, Launchbar.
    this will work the fastest.
    If you don't want to use 3rd party tools for this you can make a service using automator but that might be a bit slower than the first option. open automator. it will give you a pulldown screen wiuth the choice of what you want to make. choose "service". set it to receive no input and be available in all applications. add the following "run apple script" action to the service
    <pre style="
    font-family: Monaco, 'Courier New', Courier, monospace;
    font-size: 10px;
    margin: 0px;
    padding: 5px;
    border: 1px solid #000000;
    width: 720px;
    color: #000000;
    background-color: #ADD8E6;
    overflow: auto;"
    title="this text can be pasted into the Script Editor">
    on run {input, parameters}
    set curVolume to output volume of (get volume settings)
    -- work out the new setting
    if curVolume < 96 then
    set newVolume to curVolume + 5
    else
    -- can't go over 100
    set newVolume to 100
    end if
    -- and apply it
    set volume output volume newVolume
    end run</pre>
    save the service, go to keyboard system preferences->keyboard shortcuts->services and make a shortcut for the service you just created.

  • How do I generate a list of keyboard shortcuts for any given application

    I want to generate a list of keyboard shortcuts for all of the applications I have on my Mac. I want the list to be a simple text (or rtf) file that I can edit and organize. (By edit, I don't mean change the shortcuts, only the report of them.)
    I was using Key Cue, but it does not let me save the list to a text file.
    I want this for several purposes. One is to have a easy to reference list of shortcuts to learn. Another is to find unused key combinations that I can use for my own keyboard shortcuts that I create with DefaultKeyBinding.dict.
    Note: The program doesn't have to an OS X app. A program that runs from a shell without a GUI is plenty adequate.
    If there is a way to read the keyboard commands from a plist list or other such file, and any of you know the format for these or where I can find them, I can write a Perl script myself to do it.

    Well, the info is stored in...
    /Users/YourUserName/Library/Preferences/com.apple.universalaccess.plist
    PlistPro has a way to convert it to ASCII, but you'll srtill have work to do, as...
    {enabled = 1; key = 20; modifier = 1179648; sybmolichotkey = 28; },
    {enabled = 1; key = 20; modifier = 1441792; sybmolichotkey = 29; },
    {enabled = 1; key = 21; modifier = 1179648; sybmolichotkey = 30; },
    {enabled = 1; key = 21; modifier = 1441792; sybmolichotkey = 31; },
    {enabled = 0; key = 28; modifier = 1572864; sybmolichotkey = 15; },
    {enabled = 0; key = 27; modifier = 1572864; sybmolichotkey = 19; },
    {enabled = 0; key = 24; modifier = 1572864; sybmolichotkey = 17; },
    {enabled = 0; key = 47; modifier = 1835008; sybmolichotkey = 25; },
    {enabled = 0; key = 43; modifier = 1835008; sybmolichotkey = 26; },
    {enabled = 0; key = 28; modifier = 1835008; sybmolichotkey = 21; },
    {enabled = 0; key = 96; modifier = 1048576; sybmolichotkey = 59; },
    {enabled = 1; key = 122; modifier = 262144; sybmolichotkey = 12; },
    {enabled = 0; key = 120; modifier = 262144; sybmolichotkey = 7; },
    {enabled = 0; key = 99; modifier = 262144; sybmolichotkey = 8; },
    {enabled = 0; key = 118; modifier = 262144; sybmolichotkey = 9; },
    {enabled = 0; key = 96; modifier = 262144; sybmolichotkey = 10; },
    {enabled = 0; key = 97; modifier = 262144; sybmolichotkey = 11; },
    {enabled = 1; key = 50; modifier = 1048576; sybmolichotkey = 27; },
    {enabled = 1; key = 98; modifier = 262144; sybmolichotkey = 13; },
    {enabled = 1; key = 50; modifier = 1572864; sybmolichotkey = 51; },
    {enabled = 1; key = 100; modifier = 262144; sybmolichotkey = 57; },
    {enabled = 1; key = 17; modifier = 1572864; sybmolichotkey = 50; },
    {enabled = 1; key = 2; modifier = 1572864; sybmolichotkey = 52; },
    {enabled = 0; key = 105; modifier = 0; sybmolichotkey = 32; },
    {enabled = 0; key = 109; modifier = 0; sybmolichotkey = 33; },
    {enabled = 0; key = 103; modifier = 0; sybmolichotkey = 36; },
    {enabled = 0; key = 109; modifier = 0; sybmolichotkey = 62; },
    {enabled = 0; key = 49; modifier = 1048576; sybmolichotkey = 60; },
    {enabled = 0; key = 49; modifier = 1572864; sybmolichotkey = 61; },
    {enabled = 1; key = 2; modifier = 1310720; sybmolichotkey = 70; },
    {enabled = 1; key = 49; modifier = 1048576; sybmolichotkey = 64; },
    {enabled = 1; key = 49; modifier = 1572864; sybmolichotkey = 65; },
    {enabled = 0; key = 53; modifier = 1048576; sybmolichotkey = 73; },
    {enabled = 1; key = 107; modifier = 0; sybmolichotkey = 53; },
    {enabled = 1; key = 113; modifier = 0; sybmolichotkey = 54; }

  • How do I change the keyboard shortcut for Cycle through open documents in PS CC for Mac?

    Sorry to bug the community with such a seemingly inconsequential task, but I am seriously tired of using the awkward default keyboard shortcut for cycling through open docs in PS.  I'd like to change it to what I am used in in Chrome, which is Cmd+Option+[left] or {right} arrow keys.  I noticed this is not a command listed in the in keyboard shortcuts, for whatever reason.  Where on Earth can I change this? 
    If it is not possible to do it by default, is there a plug-in or a change to the code that will allow this basic functionality? 
    Thanks again guys and gals!

    As far as I know, you can't. It's "hard wired" in.  Not even Edit > Keyboard Shortcuts is allowed  to change it.
    However I did find this tip:
    Anyway i never found tabs in Adobe application useful, instead i prefer the old school method: simply switch off tabs feature via illustrator/ preferences/ user interface/ open documents as tabs. Then in Mac preferences panel, under keyboard, just search for the “focus on next application window” field (under menu, keyboard and text) and assign a shortcut if the default option doesn't fit you. And there is now you can easily switch between open documents!.
    The best part of this is that it can be used in all mac applications, not only Adobe ones. And remember, if you want this working on Indesign, Photoshop, etc be aware of first switch off the tab features so that the system could “see” multiple documents opened not only one single tabbed document.
    Gene

  • All the implications of placing text from another file

    Hi all,
    I have a large document with masters that I use for my proposals. I created all the masters I need in this file, then when I get a request for proposal, I just copy out the masters I need for that particular one (depending on the products requested).
    The original file is getting pretty big (175 MB), and I'm looking for ways to make it smaller, as it's starting to drag. I was thinking of cutting all text out of it, creating Word docs, then placing the text back in, but I had some questions.
    1. Will this really shrink the file size that much?
    2. How will the Word document be affected if I change text within InDesign? Do changes in InDesign change the original document?
    3. Will all of my character styles stay (such as highlighting the area where I need to fill in the customer's name)?
    If anyone could point me to a good reference on placing text or help me with some guidance I would much appreciate it. This is a big project and I want to start it correctly.
    Thanks!

    Before you do anything try file>save as and save the file that way.
    Bob

  • InDesign Placed Text Linking Issue

    Hi - I've just recently updated to CS6 and am having an issue with linking placed text files.
    When I place the Word Doc into the InDesign file initially (not in position), the link to the original document is present in the 'Links' window as expected. However, I need to transfer this text into another text box on the page and of course when I do so the link is removed.
    Therefore, I tried placing the Word Doc directly onto the page in position (I have an autoflow setup that I need the text to run through) however when I do this no link appears in the window. To clarify, I have three separate text boxes setup on my master page that I need this linked text to flow through.
    Any suggestions how to solve this? I have run through the preferences and ensured everything is as it should be.
    Thanks!

    Sorry for the double post! I've solved it - for anyone else in the same boat, I created a Master Page with the linked text flowed through the 3 separate text boxes. I then selected to override the master objects on the realtime pages and relinked to different documents from there as needed.

Maybe you are looking for

  • How to run a SQL query which is stored in a column using PL/SQL?

    Hello I have a table A and one of the column values is select * from emp where empno :=xyz; Now I would like to call this SQL query using a cursor in PL/SQL and run this for all the empno's and insert them into a temp table. Can anybody help me in wr

  • How can I use cutom build icons in labview as a switch ?

    I have two questions: I am trying to make a user interface, using custom-build icons. -How can I load/copy my icons into labview? What would be the best sollution for the usibility of the icons: -should I try to use the icon as a new overlay for labv

  • Boot-camp/Windows 7 Network Help Needed

    I recently installed Windows 7 Ultimate using Bootcamp to my macbook pro from mid-2011 and i installed it fine but its not picking up any wi-fi on windows 7 at all.

  • HT201263 i can't get my phone out of recovery mode or even restore it using iTunes

    i have iPhone 3G IOS 4.1....my phone is in recovery mode,and i can't even restore it through iTunes.whenever i try restoring it using iTunes i get error 1015,so i downloaded a firmware for it,buy yet i get the same error 1015...if anyone can help me,

  • How to set query for child View Object?

    I have a hGrid in standard page. Two View Objects are present connected using view link. I need to set where clause in the child View Object. The changes are not getting reflected when i set the where clause. Also when i try to fetch rowCount it retu