Javascript, Text frame - Flip Horizontal

I just don't understand javascript very well yet.
I want to flip horizontally, a text frame, on it's center/in place. (Yes, I want the text to be wrong reading.)
the name of the text frame is smallTXXX and the indesign document will be open at the time the script is run. (I need to add this to an existing javascript.)
Thank you, I can't figure out how to piece this one together.

var doc = app.activeDocument;
var tf = doc .textFrames.item("smallTXXX");
tf.flipItem(Flip.HORIZONTAL, AnchorPoint.CENTER_ANCHOR);

Similar Messages

  • Horizontal paragraph rule across two-column text frame?

    Hi,
    as the title suggests, how do i get a horizontal rule to run across a two-column text frame?
    I have either had the rule just apply to the entered text; had a gap where the column gutter is;
    or I have had to set the column gutter to 0mm/px and manually set carriage returns to give the impression of a gutter.
    Surely there is a better way?
    I'll attach a jpeg of my various options.
    Hope I've been clear-enough. All help is appreciated.
    Cheers, Matt

    You can put the rule in a paragraph which is spanning a columns.
    Or you can extend the paragraph rules by inputing minus values to left and right (e.g. -5mm)
    Or you can use a table instead.
    Or you can use negative left and right intend for the text but extend the rule to the end of the frame.
    Never set a carriage return manually.

  • How to make separate/individual text frame from one parent frame in indesign with javascript

    Hi all,
    Please suugest - how to make separate/individual text frame from one parent frame in indesign with javascript.
    Thanks
    Rohit

    @Larry – ah, your interpretation could be the right one…
    May I rephrase the question:
    "How to split threaded text frames to single ones?"
    "SplitStory.jsx" or "BreakFrame.jsx" under Scripts/Samples indeed could be the answer.
    From the comments in the code of "BreakFrame.jsx":
    //Removes the selected text frame (or text frames) from the
    //story containing the text frame and removes the text contained
    //by the text frame from the story.
    //If you want to split *all* of the text fames in the story, use the
    //SplitStory.jsx script.
    Uwe

  • Why is the flip horizontal or vertical  moving the frame or image?

    (CS6) Why is the flip horizontal/vertical moving the frame or image instead of just flipping it in the current frame position? CS5 did not do this.

    It flips around the point you've picked in the Transform Proxy in the upper left of the Control panel (and has always done so). Click the center point and you'll get what you want.

  • Applescript - trying to horizontally align all the text in a text frame

    I've tried the following snippet along with several others:
    tell application "Adobe InDesign CS5.5"
              tell the active document
                        set Text_Frame to the text frame "PH"
                        tell Text_Frame
                                  set theLines to every line
                                  if (theTextPos = "B") then
                                            tell theLines to set justification to left align
                                  else
                                            tell theLines to set justification to center align
                                  end if
                        end tell
              end tell
    end tell
    Throws errors about setting classes.
    ie
    error "Can’t set «class paln» of {\"MISSOULA COMMUNITY PHYSICIANS
    \", \"CENTER NO. 2
    \", \"CONDOMINIUM ASSOCIATION
    \", \"2827 FORT MISSOULA ROAD
    \", \"MISSOULA, MT 59804
    \"} to «constant mAOHcent»." number -10006 from «class paln» of {"MISSOULA COMMUNITY PHYSICIANS
    ", "CENTER NO. 2
    ", "CONDOMINIUM ASSOCIATION
    ", "2827 FORT MISSOULA ROAD
    ", "MISSOULA, MT 59804
    All I'm trying to do is center the text in a text frame if a condition is met, else left align it if another condition is met.
    Any suggestions woudl be appreciated.

    Don't get the lines first:
                                  if (theTextPos = "B") then
                                            set justification of every line to left align
                                  else
                                            set justification of every line to center align
                                  end if

  • How do I flip individual characters in a text frame.

    I have some outlined text, with tracking decreased so they overlap, and every second letter's size slightly different so the paths don't merge.
    I would like the 1st letter to be on top, without breaking it all into individual text frames, and i don't want to create any outlines.
    I have uploaded a pic describing my question in detail.
    [IMG]http://i62.tinypic.com/33xy744.png[/IMG]
    Is it possible?
    Thanks,
    Tim

    Finally I got something:
    1. A table with one cell.
    2. A paragraph style set to Global Paragraph Composer
    3. A cell style set to RTL
    4. The table cell orientation set to a rotation angle of 180°
    5. All characters in the cell rotated by script to 180°
    Here the table cell:
    And here the view from the story editor:
    And here the text frame of the one-cell-table minimized and anchored inline in a normal text flow:
    Uwe

  • Set top and bottom inset spacing values in Text Frame Options via jsx script

    I am looking for a way to set the top and bottom inset spacing values only to 2 points in Text Frame Options via a .jsx scrpt.
    For years, I have used a script that sets Preferences, such as:
    with(app.storyPreferences){
        opticalMarginAlignment = false;
        opticalMarginSize = 12;                // pts
    I would like to add the code to this same script that would make Top = 0p2 and Bottom 0p2 but leave Left and Right as 0p0.
    Any help would be greatly appreciated.

    Here is the full .jsx file that we now use to set preferences.
    Ideally, this could be modified to include setting any text frame created to have 0p2 inset Top and Bottom, but 0p0 Left and Right:
    //ApplicationTextDefaults
    //An InDesign CS2 JavaScript
    //Sets the application text defaults, which will become the text defaults for all
    //new documents. Existing documents will remain unchanged.
    with(app.textDefaults){
        alignToBaseline = false;        // align to baseline grid
        try {
    //        appliedFont = app.fonts.item("Times New Roman");
            appliedFont = app.fonts.item("Helvetica");
        catch (e) {}
        try {
            fontStyle = "Medium";
        catch (e) {}
        autoleading = 100;
        balanceRaggedLines = false;
        baselineShift = 0;
        capitalization = Capitalization.normal;
        composer = "Adobe Paragraph Composer";
        desiredGlyphScaling = 100;
        desiredLetterSpacing = 0;
        desiredWordSpacing = 100;
        dropCapCharacters = 0;
        if (dropCapCharacters != 0) {
            dropCapLines = 3;
            //Assumes that the application has a default character style named "myDropCap"
            //dropCapStyle = app.characterStyles.item("myDropCap");
        fillColor = app.colors.item("Black");
        fillTint = 100;
        firstLineIndent = "0pt";
    //    firstLineIndent = "14pt";
        gridAlignFirstLineOnly = false;
        horizontalScale = 100;
        hyphenateAfterFirst = 3;
        hyphenateBeforeLast = 4;
        hyphenateCapitalizedWords = false;
        hyphenateLadderLimit = 1;
        hyphenateWordsLongerThan = 5;
        hyphenation = true;
        hyphenationZone = "3p";
        hyphenWeight = 9;
        justification = Justification.leftAlign;
        keepAllLinesTogether = false;
        keepLinesTogether = true;
        keepFirstLines = 2;
        keepLastLines = 2;
        keepWithNext = 0;
        kerningMethod = "Optical";
        kerningValue = 0;
        leading = 6.3;
    //    leading = 14;
        leftIndent = 0;
        ligatures = true;
        maximumGlyphScaling = 100;
        maximumLetterSpacing = 0;
        maximumWordSpacing = 160;
        minimumGlyphScaling = 100;
        minimumLetterSpacing = 0;
        minimumWordSpacing = 80;
        noBreak = false;
        otfContextualAlternate = true;
        otfDiscretionaryLigature = true;
        otfFigureStyle = OTFFigureStyle.proportionalOldstyle;
        otfFraction = true;
        otfHistorical = true;
        otfOrdinal = false;
        otfSlashedZero = true;
        otfSwash = false;
        otfTitling = false;
        overprintFill = false;
        overprintStroke = false;
        pointSize = 6.3;
    //    pointSize = 11;
        position = Position.normal;
        rightIndent = 0;
        ruleAbove = false;
        if(ruleAbove == true){
            ruleAboveColor = app.colors.item("Black");
            ruleAboveGapColor = app.swatches.item("None");
            ruleAboveGapOverprint = false;
            ruleAboveGapTint = 100;
            ruleAboveLeftIndent = 0;
            ruleAboveLineWeight = .25;
            ruleAboveOffset = 14;
            ruleAboveOverprint = false;
            ruleAboveRightIndent = 0;
            ruleAboveTint = 100;
            ruleAboveType = app.strokeStyles.item("Solid");
            ruleAboveWidth = RuleWidth.columnWidth;
        ruleBelow = false;
        if(ruleBelow == true){
            ruleBelowColor = app.colors.item("Black");
            ruleBelowGapColor = app.swatches.item("None");
            ruleBelowGapOverprint = false;
            ruleBelowGapTint = 100;
            ruleBelowLeftIndent = 0;
            ruleBelowLineWeight = .25;
            ruleBelowOffset = 0;
            ruleBelowOverprint = false;
            ruleBelowRightIndent = 0;
            ruleBelowTint = 100;
            ruleBelowType = app.strokeStyles.item("Solid");
            ruleBelowWidth = RuleWidth.columnWidth;
        singleWordJustification = SingleWordJustification.leftAlign;
        skew = 0;
        spaceAfter = 0;
        spaceBefore = 0;
        startParagraph = StartParagraph.anywhere;
        strikeThru = false;
        if(strikeThru == true){
            strikeThroughColor = app.colors.item("Black");
            strikeThroughGapColor = app.swatches.item("None");
            strikeThroughGapOverprint = false;
            strikeThroughGapTint = 100;
            strikeThroughOffset = 3;
            strikeThroughOverprint = false;
            strikeThroughTint = 100;
            strikeThroughType = app.strokeStyles.item("Solid");
            strikeThroughWeight = .25;
        strokeColor = app.swatches.item("None");
        strokeTint = 100;
        strokeWeight = 0;
        tracking = 0;
        underline = false;
        if(underline == true){
            underlineColor = app.colors.item("Black");
            underlineGapColor = app.swatches.item("None");
            underlineGapOverprint = false;
            underlineGapTint = 100;
            underlineOffset = 3;
            underlineOverprint = false;
            underlineTint = 100;
            underlineType = app.strokeStyles.item("Solid");
            underlineWeight = .25
        verticalScale = 100;
    //Units & Increments preference panel
    //Must do this to make sure our units that we set are in points. The vert and horiz
    //units that get set default to the current measurement unit. We set it to points
    //so we can be sure of the value. We'll reset it later to the desired setting.
    with(app.viewPreferences){
        horizontalMeasurementUnits = MeasurementUnits.points;    // Ruler Units, horizontal
        verticalMeasurementUnits = MeasurementUnits.points;        // Ruler Units, vertical
    //General preference panel
    with(app.generalPreferences){
        pageNumbering = PageNumberingOptions.section;    // Page Numbering, View
        toolTips = ToolTipOptions.normal;                    // Tool Tips
    // Not supported in CS4
    //    toolsPalette = ToolsPaletteOptions.doubleColumn;    // Floating Tool Palette
        completeFontDownloadGlyphLimit = 2000;                // Always Subset Fonts...
        try {
            //Wrapped in try/catch in case it is run with CS4 and earlier to avoid the error
            preventSelectingLockedItems = false;                // Needed for CS5+
        catch (e) {}
    //Type preference panel
    with (app.textEditingPreferences){
        tripleClickSelectsLine = true;    // Triple Click to Select a Line
        smartCutAndPaste = true;        // Adjust Spacing Automatically when Cutting and Pasting Words
        dragAndDropTextInLayout = false;    // Enable in Layout View
        allowDragAndDropTextInStory = true;    // Enable in Story Editor
    with(app.textPreferences){
        typographersQuotes = true;            // Use Typographer's Quotes
        useOpticalSize = true;                // Automatically Use Correct Optical Size
        scalingAdjustsText = true;            // Adjust Text Attributes when Scaling
        useParagraphLeading = false;    // Apply Leading to Entire Paragraphs
        linkTextFilesWhenImporting = false;    // Create Links when Placing Text and Spreadsheet Files
    // Missing following (Font Preview Size, Past All Information/Text Only)
    //Advanced Type preference panel
    with(app.textPreferences){
        superscriptSize = 58.3;                // Superscript, size
        superscriptPosition = 33.3;            // Superscript, position
        subscriptSize = 58.3;                // Subscript, size
        subscriptPosition = 33.3;            // Subscript, position
        smallCap = 70;                        // Smallcap
    with(app.imePreferences){
        inlineInput = false;                // Use Inline Input for Non-Latin Text
    //Composition preference panel
    with(app.textPreferences){
        highlightKeeps = false;                    // Keep Violations
        highlightHjViolations = false;            // H&J Violations
        highlightCustomSpacing = false;            // Custom Tracking/Kerning
        highlightSubstitutedFonts = true;    // Substituted Fonts
        highlightSubstitutedGlyphs = false;    // Substituted Glyphs
        justifyTextWraps = false;                // Justify Text Next to an Object
        abutTextToTextWrap = true;                // Skip by Leading
        zOrderTextWrap = false;                    // Text Wrap Only Affects Text Beneath
    //Units & Increments preference panel
    with(app.viewPreferences){
        rulerOrigin = RulerOrigin.spreadOrigin;                    // Ruler Units, origin
    //    These are set at the end of the script after all the changes have been made
    //    horizontalMeasurementUnits = MeasurementUnits.points;    // Ruler Units, horizontal
    //    verticalMeasurementUnits = MeasurementUnits.inches;        // Ruler Units, vertical
        pointsPerInch = 72;                    // Point/Pica Size, Points/Inch
        cursorKeyIncrement = 1;                // Keyboard Increment, Cursor Key
    with(app.textPreferences){
        baselineShiftKeyIncrement = 2;    // Keyboard Increment, Baseline Shift
        leadingKeyIncrement = 2;        // Keyboard Increment, Size/Leading
        kerningKeyIncrement = 20;            // Keyboard Increment, Kerning
    //Grids preference panel
    with(app.gridPreferences){
        baselineColor = UIColors.lightBlue;    // Baseline Grid, Color
        baselineStart = 48;                        // Baseline Grid, Start
        baselineDivision = 6;                    // Baseline Grid, Increment Every
        baselineViewThreshold = 50;                // Baseline Grid, View Threshold
        baselineGridRelativeOption = BaselineGridRelativeOption.topOfPageOfBaselineGridRelativeOption;    // Baseline Grid, Relative To
        gridColor = UIColors.lightGray;            // Document Grid, Color
        horizontalGridlineDivision = 12;    // Document Grid, Horizontal, Gridline Every
        horizontalGridSubdivision = 12;            // Document Grid, Horizontal, Subdivisions
        verticalGridlineDivision = 12;            // Document Gird, Vertical, Gridline Every
        verticalGridSubdivision = 12;            // Document Grid, Vertical, Subdivisions
        gridsInBack = true;                        // Grids in Back
        documentGridSnapto = false;                // snap to grid or not
        documentGridShown = false;                // show document grid
    //Guides & Pasteboard preference panel
    with(app.documentPreferences){
        marginGuideColor = UIColors.violet;                // Color, Margins
        columnGuideColor = UIColors.magenta;            // Color, Columns
    with(app.pasteboardPreferences){
        bleedGuideColor = UIColors.fiesta;                // Color, Bleed
        slugGuideColor = UIColors.gridBlue;                // Color, Slug
        previewBackgroundColor = UIColors.lightGray;    // Color, Preview Background
        minimumSpaceAboveAndBelow = 72;                    // Minimum Vertical Offset
    with(app.viewPreferences){
        guideSnaptoZone = 4;                            // Snap to Zone
    with(app.guidePreferences){
        guidesInBack = false;                            // Guides in Back
    //Dictionary preference panel
    with(app.dictionaryPreferences){
        composition = ComposeUsing.both;    // Hyphenatin Exceptions, Compose Using
        mergeUserDictionary = false;    // Merge User Dictionary into Document
        recomposeWhenChanged = true;    // Recompose All Stories When Modified
    // Missing (Lang, Hyph, Spelling, Double Quotes, Single Quotes)
    //Spelling preference panel
    with(app.spellPreferences){
        checkMisspelledWords = true;                    // Find, Misspelled Words
        checkRepeatedWords = true;                        // Find, Repeated Words
        checkCapitalizedWords = true;                    // Find, Uncapitalized Words
        checkCapitalizedSentences = true;                // Find, Uncapitalized Sentences
        dynamicSpellCheck = true;                        // Enable Dynamic Spelling
        misspelledWordColor = UIColors.red;                // Color, Misspelled Words
        repeatedWordColor = UIColors.green;                // Color, Repeated Words
        uncapitalizedWordColor = UIColors.green;    // Color, Uncapitalized Words
        uncapitalizedSentenceColor = UIColors.green;    // Color, Uncapitalized Sentences
    //Autocorrect preference panel
    with(app.autoCorrectPreferences){
        autoCorrect = true;                            // Enable Autocorrect
        autoCorrectCapitalizationErrors = false;    // Autocorrect Capitalization
    // Missing (Language, Misspelled word pairs)
    //Display Performance preference panel
    with(app.displayPerformancePreferences){
        defaultDisplaySettings = ViewDisplaySettings.typical;    // Preserve Object-Level
        persistLocalSettings = false;
    // Missing (antialiasiing, greek below
    //Story Editor Display preference panel
    with(app.galleyPreferences){
        textColor = InCopyUIColors.black;                // Text Color
        backgroundColor = InCopyUIColors.white;            // Background
        smoothText = true;                                // Enable Anti-Aliasing
        antiAliasType = AntiAliasType.grayAntialiasing;    // Type
        cursorType = CursorTypes.standardCursor;    // Cursor Type
        blinkCursor = true;                                // Blink
    // Missing (Font, Size, Line Spacing & Theme)
    //File Handling preference panel
    with(app.generalPreferences){
        includePreview = true;                        // Always Save Preview Images with Doc
        previewSize = PreviewSizeOptions.medium;    // Preview Size
    with(app.clipboardPreferences){
        preferPDFWhenPasting = false;                // Prefer PDF When Pasting
        copyPDFToClipboard = true;                    // Copy PDF to Clipboard
        preservePdfClipboardAtQuit = false;            // Preserve PDF Data at Quit
    // Missing (Enable Version Cue)
    //    Optical margin (hanging punctuation, outside margins)
    with(app.storyPreferences){
        opticalMarginAlignment = false;
        opticalMarginSize = 12;                // pts
    //Wrap Up (do at end of script)
    //Units & Increments preference panel
    //Must do this to make sure our units that we set are in points. The vert and horiz
    //units that get set default to the current measurement unit. We set it to points
    //so we can be sure of the value. We'll reset it later to the desired setting.
    with(app.viewPreferences){
        horizontalMeasurementUnits = MeasurementUnits.picas;    // Ruler Units, horizontal
        verticalMeasurementUnits = MeasurementUnits.inches;    // Ruler Units, vertical
    //    These two flags are turned off to avoid the error message about
    //    missing image links when InDesign opens an ad. This can especially
    //    be a problem when doing batch processes.
    with(app.linkingPreferences){
        checkLinksAtOpen = false;            // checkbox: true/false
        findMissingLinksAtOpen = false;        // checkbox: true/false

  • Help with adjusting layout, re-sizing text frames and images to fit new margin?

    i'm using InDesign CS5.5. I have a layout with several text frame boxes as well as some jpg and pdf images. I'm expanding the margin on one side and want to expand the text frames to utilize the extra space rather than just shift everything over. I've used the adjust layout script (which still requires some manual adjustment after) and obviously everything can be done manually but I'm looking for a more efficient solution. One challenge is that my pdf image needs to be re-sized separately to maintain scale of the image, the text frames just expand horizontally. What I would like is to have is a script that can do all of this at once, or is there a way to save the layout settings and apply them to my other documents? I have almost 300 documents to adjust... Can anyone suggest anything? Thanks.

    It could probably be modified to run on all open docs or a folder. You should ask over in scripting. InDesign Scripting

  • How can I simply create a text frame with perfect rounded ends?

    I'm recreating a new edition of a book that was originally created in Quark. It uses round-ended text frames. When using the simplest method of corner options, the ends aren't proper semicircles, even though the radius is set to half the height of the frame.
    The other problem is that I can't reduce the width sufficiently to make it look balanced. I use the direct selection tool to close in the right-hand end, so that I don't distort the shape. There's no right indent for the paragraph, but as I reduce the width the text breaks into two lines, even though I've greater space after the text than the left indent. My best solution was to create the shape in Illustrator and copy and paste into InDesign, assign text content, centre thte text vertically, use 3mm left indent. I still couldn't pull the right-hand end in tight enough. So I had to resort to making a group of the lozenge shape with a normal rectangular text frame on top.
    Does anyone know why these problems occur, and can Adobe improve the corner option?

    One last refinement: It's convenient if the script allows you to Undo/Redo its actions -- let me add that for completeness' sake. The following is the complete script again, no further editing required.
    //DESCRIPTION:Overlay round corners on a single textframe
    // A Jongware Script 2-Apr-2012
    app.doScript(function(textframe){
    if (textframe instanceof Group && textframe.pageItems.length == 2)
    roundedRect = app.selection[0].polygons[0];
    textframe = app.selection[0].textFrames[0];
    textframe.properties = {strokeWeight:roundedRect.strokeWeight,strokeTint:roundedRect.strokeTint,strokeColor:roundedRect.strokeColor};
    roundedRect.remove();
    app.selection[0].ungroup();
    left = textframe.geometricBounds[1];
    right = textframe.geometricBounds[3];
    height = textframe.geometricBounds[2] - textframe.geometricBounds[0];
    center = (textframe.geometricBounds[2] + textframe.geometricBounds[0])/2;
    radius = height/2;
    leftRounded = textframe.parent.ovals.add({geometricBounds:[center-radius,left-radius,center+radius,left+radius]});
    riteRounded = textframe.parent.ovals.add({geometricBounds:[center-radius,right-radius,center+radius,right+radius]});
    rectBetween = textframe.parent.rectangles.add({geometricBounds:[center-radius,left,center+radius,right]});
    roundedRect = rectBetween.addPath([leftRounded,riteRounded]);
    roundedRect.properties = {strokeWeight:textframe.strokeWeight,strokeTint:textframe.strokeTint,strokeColor:textframe.strokeColor};
    textframe.properties = {strokeWeight:0};
    app.select(textframe.parent.groups.add([roundedRect,textframe]));
    }, ScriptLanguage.JAVASCRIPT, app.selection[0], UndoModes.ENTIRE_SCRIPT, "Overlay Round Corners");

  • How do I create a series of text frames from a list of files?

    And I'm back again.
    This time, I'm wondering how I can use JavaScript to place a series of text frames from a list of files, preferably with the ability to specify criteria before running the script.
    Here's the details: I work for a newspaper and I lay out stories for the pages (in addition to the other part of my job, laying out ad spaces, as detailed in a previous thread, for which I requested another script, thanks Andreas and Jongware ). The file names for the stories are labeled for the section they go in, like L- for Life, C- for Comment, S- for Sports, etc.
    I'd like to create a script that asks for a criteria in a text box (where I can type L-, C-, S- or whatever else I need) and then places all of the stories, in a specified directory, whose file names match what was typed in the box, one text frame for each.
    I can't rightly tell if this is a simpler or more difficult script to write out, but I plan on putting research into it as usual so I can develop it myself. However, I figured it would be more efficient to ask first, then research, so that while I'm researching, I can refer to the opinions of my fellow forumites, and/or the mods.
    Thanks again for any assistance offered.

    And I'm back again.
    This time, I'm wondering how I can use JavaScript to place a series of text frames from a list of files, preferably with the ability to specify criteria before running the script.
    Here's the details: I work for a newspaper and I lay out stories for the pages (in addition to the other part of my job, laying out ad spaces, as detailed in a previous thread, for which I requested another script, thanks Andreas and Jongware ). The file names for the stories are labeled for the section they go in, like L- for Life, C- for Comment, S- for Sports, etc.
    I'd like to create a script that asks for a criteria in a text box (where I can type L-, C-, S- or whatever else I need) and then places all of the stories, in a specified directory, whose file names match what was typed in the box, one text frame for each.
    I can't rightly tell if this is a simpler or more difficult script to write out, but I plan on putting research into it as usual so I can develop it myself. However, I figured it would be more efficient to ask first, then research, so that while I'm researching, I can refer to the opinions of my fellow forumites, and/or the mods.
    Thanks again for any assistance offered.

  • Indesign CS3 text frame parameters and export PDF

    could use some help with the following:
    I need to edit and export a large number (7000) Indesign documents (one page)
    1. check for locked text frames and unlock
    2. group all text frames
    3. set grouped text frames at x=8 millimeters, y 10 milimeters
    4. export the documents to PDF in a subfolder called "Out"
    5. save and close the documents in the same subfolder as an Indesign CS3 document (orig is CS2)
    This is what I've been trying soo far:
    Now only checking one text frame - should be all text frames
    "close document 1 saving yes" doesn't work because the originals are from CS2
    I get a PDF called "Adobe Indesign SC3"
    set processFolder to choose folder with prompt "Choose a folder that contains Innd Docs to process"
    tell application "Finder"
    if not (exists folder "OUT" of processFolder) then
    make new folder at processFolder with properties {name:"OUT"}
    end if
    set the destination_folder to folder "OUT" of processFolder as alias
    end tell
    tell application "Finder"
    try
    set listFiles to (files of contents of processFolder) as alias list
    on error
    set listFiles to (files of contents of processFolder) as alias as list
    end try
    repeat with thisFile in listFiles
    tell application "Adobe InDesign CS3"
    with timeout of 120 seconds
    activate
    set properties of view preferences to {horizontal measurement units:millimeters, vertical measurement units:millimeters, ruler origin:page origin}
    open thisFile
    set myDoc to document 1
    set docName to name
    tell myDoc
    set transform reference point of layout window 1 to top left anchor
    set myBox to text frame 1 of page 1
    set properties of myBox to {locked:false}
    move myBox to {8, 10}
    end tell
    export document 1 format PDF type to (destination_folder as string) & docName & ".pdf" using PDF export preset "[Drukwerkkwaliteit]" without showing options
    close document 1 saving yes
    tell application "Finder" to move thisFile to destination_folder with replacing
    end timeout
    end tell
    end repeat
    end tell
    end
    end
    Any help is greatly appreciated - Doing this manually is a lot of work!!!!!
    Peter

    You're asking for the name of the application, not the document -- you need<br />to do it after your "tell myDoc".<br /><br />You could also get the name from the alias you open, rather than the open<br />document, something like:<br /><br />repeat with thisFile in listFiles<br />set oldDelims to AppleScript's text item delimiters<br />set AppleScript's text item delimiters to {":"}<br />set docName to text item -1 of (thisFile as Unicode text)<br />set AppleScript's text item delimiters to oldDelims<br /><br />You should also move your "set properties of view preferences" line to after<br />your "tell myDoc".<br /><br />-- <br />Shane Stanley <[email protected]>

  • Help about count character number in a text frame

    Hi, all
    i have a question about how to get the number of character in a text frame. In fact the problem is if there is a table or an image in the text frame, the number of character includes the text in the table.
    Can somebody tell me how to count just the number of character of the text .
    Thanks in advance!!

    Hi! All
    On the top of the Toolbox of INDesign CS3, there are two arrows <>, when one clicks it, it will either
    1. rearrange all buttons in to one column or from one column to two columns
    2. It will change it to horizontal if it is in vertical status.
    What are that two arrows called? I mean what name they are. Thanks
    Regards,
    Z

  • Make anchored text frame after it is move in to story

    Hi,
    In my document have 4 stories. and one text frame
    this text frame is make of anchored text frame and it move in story 1
    It is possible ?
    please help me...
    my coding is shown in below
    tell application "Adobe InDesign CC 2014"
            set storyofset to story offset of myElement-------------->myElement is particular xpath
            tell storyofset
                set anchored position of anchored object settings of text frame 1 to anchored
                set horizontal reference point of anchored object settings of text frame 1 to anchor location
                set anchor xoffset of anchored object settings of text frame 1 to 0
                set anchor yoffset of anchored object settings of text frame 1 to 0
                set text column count of text frame preferences of text frame 1 to 1
            end tell
        end tell
    thanks in advance.
    by, John Peter.

    I copied text & paisted it and then draged the 3 photos from the file...then clicked on the photo then clicked the inline boxon tool bar nexed to floating one and that is how I did it
    I do not know what you mean "cut & paist"  how do I get the photo in from my picter folder if I do not drag it to the page in Pages? 
    I went to my photo folder and copied a photo and paisted the photo on the top left part of the page and it went there but there was no text to the right of photo...I could crop the photo to what ever size but no text to the right of photo...
    This is just too big of a mess of a program as it should be easier then this,,,I hav e 300 photos in this project and would have to re-paist them all...that is nuts...
    I see the button to the right of inline and floating that has 6 [lace to have the photo but the text does not float around the photo...
    If this is what your talking about this very little freedom in my page layout as I need it to let me place it where I need it to be and the wrap the text...
    There has to be an easier way to get my books ready for other formats other that Apple's iPad...iBooks Author was way eisier to make ready for iTunes...Love that program!!!
    Want my books for sale on all the other formats and was told by Apple Pages whould do it...
    I must be be out to lunch or the designers at Apple are ???

  • InDesign CS3 Scripting XML Import Multiple Images into same Text Frame

    I am having trouble importing multiple images into the same Text Frame using XML import. I imported 5 images into the text frame. However, all 5 images are laying on top of one another. Does anyone know if there is a way to have all images laying out like how Microsoft Word handles inline images, i.e., laying out next image to the right of previsous image in the same line and if there is not enough space left in the line, then wrap to next line. Thanks in advance. I understand I could use JavaScript to do post import processing, e.g, calculate the image size and place each images accordingly. But I am trying to see whether there is a way to do this without scripts.

    You can apply an object style to all anchored images by script. A text frame containing main flow should be selected.
    var doc = app.activeDocument;
    var textFrame =  app.selection[0];
    var rectangles = textFrame.texts[0].rectangles;
    if (rectangles.length > 0) {
         for (var i=0; i < rectangles.length; i++) {
              rectangles[i].appliedObjectStyle = doc.objectStyles.item("Cover");
    However, there is a better approach:
    Step 1
    Create place holders for a single "Book" element and format it as needed -- apply an object style to the cover.
    Step 2
    Import the xml file -- the placeholders are replaced with data from the 1st xml element
    Step 3
    Drag & drop the element containing all "Books" elements into the main flow -- all elements are placed and formatted the same way as in step 1.
    Finally, add a new page, click the overset text icon and autoflow text to add pages so that to fit all the text.
    Hope this helps.
    Kasyan

  • How to map more than one xml element with some Paragraph in a Text Frame

    Hi friends,
    I am new in InDesign Java Scripting and I have to place or map, more than one xml elements of different parents, into one textbox. Is it possible through JavaScript? Can anyone help me in this because I have no idea how it should work and it urgently required.
    Thanks in Advance

    I had answered to you already in your first post: the short answer is that it's not possible on the same text box unless you assign a common ancestor of these two "parents" item. That's not a question of scripting, it's the way Indesign handle the XML with the layout. Import a xml in Indesign and drop tags to page item. What you can do manually is quite representative of what can be done through scripting.
    If you assign this anscestor to the text frame, you have to expect that all text child items will be displayed in the text frame (including the text of all the child of the two "parents" and all the other parents/childs that could be under the common ancestor). Having a XML that is designed for Indesign usage is pretty much inevitable if you are doing anything "serious".

Maybe you are looking for

  • How to get just the key from a database ?

    Hello, the sample at FAQs was not enought to me... My code to retrieve just the key (Exists this record ?). //     Checks if the ticket exists in the database. BOOL     CDSDBBD::TicExist(     char     *pcaTicCod)      int          iResult;      int  

  • Error when calling a javascript fonction from asp c# code

    Hi, I have an error when I excute my code below and I do not understand where it is coming from. page ASPX: <asp:Button ID="Bt_refresh" OnClick="Bt_refresh_Click" runat="server" Text="Resfresh" /> page ASP: protected void Bt_refresh_Click(object send

  • Problem when connecting locally to Oracle Database 10g from Java code

    Good afternoon, I try to connect to my local Oracle 10g from JAVA code. Could somebody tells me what are the 'values' to enter in place of 'value1, value2, value3' in the following: final String connectionURLThin = "jdbc:oracle:thin:@value1:value2:va

  • View usage

    With the new webpage set up are they a way to tell the difference between a text and a pic under view my usage?

  • Broadband drops out way too much!

    I would like to know how BT justify their price hikes. I am now paying nearly £50 a month (basic) for phone and broadband, they can't even give a decent service! I AM SICK of my internet dropping out about 15 times a day! I had nothing but trouble wi