[JS] CS3 Apply document defaults to insertion point

Is there any way to apply the document defaults to an insertion point? I
have a script that is looping through a whole bunch of text files,
formatting them (with thinks like tab stops and indents). The thing is I
don't want any of the tab stops, indents etc. to be left over from the
previous import. Is there any way to apply the default document
formatting before I import the next text file or do I have to manually
remove all tab stops, indents, etc.?

I think you can use:
myIP.properties = myDoc.textDefaults.properties;
although to be safe, you might be better off doing:
myIP.paragraphs[0].properties = myDoc.textDefaults.properties;
Actually, both seem to work.
Dave

Similar Messages

  • [CS3] [JS] add XML  Element to Insertion Points

    hi list,
    i'll do some text parsing in indesign cs3 intended to add some xml elements to my document.
    i just wonder why i can't markup an insertion point. is the following approach correct? The code works fine, only the return value (stored in the _xml variable) is not the new element but the parent element. The same code works without using the insertion point (marking up the text object [xmlElements.add(_dokument.xmlTags.item("index") , erg[0]))] ).
    Any ideas or thoughts?
    var _dokument = app.activeDocument;
    main ();
    // ** main ()
    function main() {
    //Set the find options.
    app.findGrepPreferences = NothingEnum.nothing;
    app.changeGrepPreferences= NothingEnum.nothing;
    //find any string encloased by @
    app.findGrepPreferences.findWhat = "@.*?@";
    erg = _dokument.findGrep();
    while (erg.length > 0) {
    _xml = _dokument.xmlElements[0].xmlElements.item("text").xmlElements.add(_dokument.xmlTags.item( "index") , erg[0].insertionPoints[0]);
    erg[0].contents = "";
    erg = _dokument.findGrep();

    hi dave,
    gui testing is always a good idea :-) but in this case the behaviour is different:
    your observation is correct (anyway at least a strange behaviour compared to any xml editing tool i know == how adobe intended to insert an empty element?), tagging in the gui a tagged insertion point tags the whole story.
    in the script a new element is added but the return value is the parent element (the xmlElement of the whole story).
    this causes a problem when i add an attribute (the intention of the above script is to add references) which is added to the parent element.
    gregor

  • Fonts default to 50 point when applying a paragraph style

    I have run into this several times.  When updating an InDesign file from an older version (now using CS5) when I apply a paragraph style the font defaults to 50 point no matter the style settings.  Is there some way to avoid this.  Currently I'm copying and pasting the graphics into a new file and having to reset the text.  If I copy any of the old text over it causes the same problem.
    Most of our text is copied and pasted from Microsoft Word (old version and new text edits), however, the text that was already in the document and the new text both do the same thing when a style is applied.
    CS5
    Win 7 Pro 64bit

    My original "body" style isn't base on any style and the other styles are based on "body" but none of them (including Basic Paragraph), have 50 as the size.
    I had it wrong in my original question, it's not 50 point size, it's 30 point with 50 point leading, bold, and Myriad Pro (which is my body font) that everything converts to no matter which style I choose.  My basic paragraph style is Times New Roman 12/14.  Body font that everything is based on is Myriad Pro, regular, 10/14.

  • Find text from current insertion point - indesign cs3 javascript

    Hi all,
    I need to find the text from the insertion point in CS3 document through javascipt. Built in indesign has this feature. I want to do this in my script.
    Anybody have the idea/solutions for ths...
    Thanks,
    Vaasu

    Thanks csm_phil for your interest... see my below code:
    if(app.documents.length>0)
        myDoc=app.activeDocument;
        var myFoundchar=new Array();
        app.findTextPreferences = NothingEnum.nothing;
        app.changeTextPreferences = NothingEnum.nothing;
        app.findGrepPreferences=     NothingEnum.nothing;
        app.findGrepPreferences.fontStyle="Italic"
        app.findGrepPreferences.findWhat ="[\\l\\u].+?( v\. ).+" //"(.+?(v\.).+)";
    var myResults = myDoc.findGrep();
    for (var i = 0; i < myResults.length; i++)
            alert(myResults[i].contents);
        app.findGrepPreferences=     NothingEnum.nothing;
        app.findGrepPreferences.findWhat =", \\d{1,}.+?\\d{4}?\\) ";
        var mySearch = myDoc.findGrep();
        app.select(mySearch[0].insertionPoints[0]);
        alert(mySearch[0].contents);
        app.findGrepPreferences = null;
    alert("Done");
    here i am trying the fetch the Table of cases, example find results are
    Sears, Roebuck & Co. v. Camp, 124 N.J. Eq. 403, 407 (E. & A. 1938)
    Sears, Roebuck & Co. v. Camp, 124 N.J. Eq. 403, 408 (E. & A. 1938)
    Gramatan Nat’l Bank & Trust Co. v. Backman, 30 N.J. Super. 349 (App. Div. 1954)
    So, the 2nd search mysearch always giving first line output above.           , 124 N.J. Eq. 403, 407 (E. & A. 1938)
    If i use the  mySearch[i].contents sometimes it doesn't give the correct result. Since, if gives if other than the case name ends with , and digits. It makes the result totally wrong.
    Thanks,
    vaasu

  • [JS][CS3] Insertion Point

    HI All
    I need to get a hold of an insertion point between 2 characters and add some negative kerning to the characters either side.
    I have tried:
    myInsertion = myPara.characters[-3].insertionPoints;
    and many variations of that line, but with no joy.
    Can someone please help me out here?
    Cheers (as always)
    Roy

    This will set the kerning on each side of that character to a specific value:
    myPara.characters[-3].insertionPoints.everyItem().kerningValue = -25;
    If you want to use different values, then:
    myPara.characters[-3].insertionPoints[0].kerningValue = leftKern;
    myPara.characters[-3].insertionPoints[1].kerningValue = rightKern;
    where leftKern and rightKern hold the values you want.
    Dave

  • [AS] How to make cross reference at insertion point

    Hi,
    I have a book ("indb") including several documents with several "anchors"
    (german translation: "Textanker") where cross references from different documents are linked to.
    What I already got is to reference all anchors and collect them in a list.
    Now I would like to make a new cross reference at the insertion point
    in a text frame of the active document - can't get it to run :-(
    Is anybody out there who can post a AS-sample doing this?
    Thanks in advance!
    Here is the reference to an already existing anchor:
    {hyperlink text destination id 44155 of document "kapitel 2.indd" of application "Adobe InDesign CS4"}
    The code I tried to make a new cross reference looks like this - but of course doesn't work:
    tell application "Adobe InDesign CS4"
    tell active document
    make new hyperlink with properties {name:"new hyperlink", destination:hyperlink text destination id 44155 of document "kapitel 2.indd"}
    end tell
    end tell

    Thanks a lot - got it now!
    Maybe it could be helpful for others to look at your answer  
    with the placeholders replaced by "real" strings as it was hard for me
    to figure out the right form:
    tell document 1
    set theDest to make hyperlink text destination with properties {name:"Some name", destination text:<a reference to the relevant text>}
    this line for example looks like this =>
    set theDest to make hyperlink text destination with properties {name:"Some name", destination text:insertion point 902 of story id 44083 of document "kapitel 3.indd" of application "Adobe InDesign CS4"}
    set theSource to make cross reference source with properties {name:"Some name",source text:< reference to the relevant text>}
    this line for example looks like this =>
    set theSource to make cross reference source with properties {name:"Some name", source text:cursorPosition, applied format:cross reference format id 44305 of document "kapitel 1.indd" of application "Adobe InDesign CS4"}
    where "cursorPosition" was defined before by
    set cursorPosition to object reference of selection
    (the cross reference source needs the applied format reference too)
    make hyperlink with properties {source:theSource, destination:theDest, visible:true, highlight:invert, width:thick, border color:dark green, border style:dashed, name:"Whatever" }
    this line for example looks like this =>
    make hyperlink with properties {source:theSource, destination:hyperlink text destination id 44184 of document "kapitel 3.indd" of application "Adobe InDesign CS4", border color:black, highlight:none, border style:solid, hidden:false, visible:true, width:thin}
    end tell

  • How to locate the first insertion point on every page?

    I need to paste some same anchored objects on every page for exporting RTF format.
    So I need to locate the first insertion point on every page.
    Then, I use the code below (make a simple example):
    for(i = 0; i < app.documents[0].pages.length; i ++){
         app.select(app.documents[0].pages[i].textFrames[0].insertionPoints[0])
         app.paste()
    But when a file has a very long table spread over several pages, the location operation will select the insertion point before the table --- the starting point of the table.
    For instance, a table start on page 3 and end on page 10
    app.documents[0].pages[4~10].textFrames[0].insertionPoints[0])  can't select the first insertion point from page 4 to page 10. (In terms of scripting, the insertion point exists before the very long table starting on page 3.)
    How can I solve the problem? Thanks in advance.

    I dont know exactly what you are trying to do but you can try this. If you have table which runs trough multiple pages, you can first divede this tabel, that cells on separate pages would represent stand alone table. Than you can fit textframe to this table. When addressing indention poin you will get right position.
    In your case when table start at 3rd and ends on 10th page you would get 8 tables in 8 textframes on its own page. If textframes are linked and table is smaller than textframe you will have problem when addressing first insertion point on 4th or any other page. That why you should fit textframe to table:
    var bl=app.activeDocument.pages[1].textFrames[0].insertionPoints[0].baseline
    var tf=app.activeDocument.pages[1].textFrames[0];
    var gb=[tf.geometricBounds[0],tf.geometricBounds[1],bl,tf.geometricBounds[3]];
    tf.geometricBounds=gb;
    Now when you set
    app.activeDocument.pages[1].textFrames[0].insertionPoints[0] you will get position before table or
    app.activeDocument.pages[1].textFrames[0].insertionPoints[-1] you will get position after table

  • How can i insert the insertion point in each paragraph first

    Hi all
    Please find the below script, this script place the insertion point in end of the each paragraph, but i need to place the insertion point in first letter of the each paragraph. Please help.
    var myDoc=app.documents.item(0)
    var myLib=app.libraries.item(0)
    app.findTextPreferences=null;
    app.changeTextPreferences=null;
    app.findChangeTextOptions.caseSensitive=false;
    app.findChangeTextOptions.includeFootnotes=false;
    app.findTextPreferences.appliedParagraphStyle="TX"
    app.findTextPreferences.findWhat="^p"
    var myFinds=myDoc.findText()
    for(i=0; i<myFinds.length; i++)
    var myIcon=myLib.assets.item("Para").placeAsset(myFinds[i].insertionPoints[0])[0]
    myIcon.appliedObjectStyle=myDoc.objectStyles.item("Para No")
    Thanks & Regards
    Nithin

    @Nithin – inserting the anchor by placing the asset is changing the position of the next anchor, because the script's for-loop is running from the first found instance to the last found one.
    If you go through all the found instances from back to forth would be one solution.
    var myDoc=app.documents.item(0)
    var myLib=app.libraries.item(0)
    app.findGrepPreferences=null;
    app.changeGrepPreferences=null;
    app.findChangeGrepOptions.includeFootnotes=false;
    app.findGrepPreferences.appliedParagraphStyle="TX"
    app.findGrepPreferences.findWhat=".+\\r"
    var myFinds=myDoc.findGrep()
    for(i=myFinds.length-1; i>=0; i--)
    var myIcon=myLib.assets.item("Para").placeAsset(myFinds[i].insertionPoints[0])[0]
    myIcon.appliedObjectStyle=myDoc.objectStyles.item("Para No")
    Another one would be doing the search from back to forth and not changing the for-loop:
    var myFinds=myDoc.findGrep(true);
    Array of Text findGrep ([reverseOrder: bool])
    Finds text that matches the find what value.
    Uwe

  • How do I let Apple know they need to include an option for controlling the insertion point cursor in system preferences?

    As described above.
    I have spent far too much time investigating this issue! All I would like to do is have the insertion point cursor (the 'I' shaped text thing) not dissapear when navigating text in a word document with the arrow keys.
    Some forums say it's an apllication issue, i.e. microsoft, others say you used to be able to do it in older versions of mac os'.
    This isn't a problem for Mac programmes. Obviously it is an issue when Microsoft programmes cross over to Mac. If the computer was a PC then I could customise the blinking rate, turn it on or off etc under the control panel options. With a Mac running MS Office I have not got this option.
    So how do I go about telling Apple of my displeasure? So hopefully for future editions of OS or Office for Mac this very minor but completely infuriating problem gets ironed out?
    Cheers x

    Thank you Ralph n Kurt, very quick off the mark boys, well done
    Just checking in to inform you that today, after putting up with the issue for over a year, it has sorted itself out, MIRACLE! I don't know how but I've got a fully trackable insertion point when I navigate with my arrow keys!!
    Do you think it's the big-wigs (because I complained to both Mac n MS) tweaking my computer behind the secenes? and if so which one would've done it? My money's on the geniusii.
    Either way I am well chuffed and thanks again!
    x

  • How do I change "At Insertion Point" to "Below Current Line" globally?

    Hello,
    I have a book that I will be converting to Structured FrameMaker. All of the graphics are referenced to the chapters with the Anchored Frame set to:
    "At Insertion Point"
    "Distance Above Baseline: 0.0 pt"
    If I do not change the Anchor Frame to "Below Current Line", then all of my graphics will float above the text, when in Structured FrameMaker and I will have to manually set each graphic to "Below Current Line".
    Since I have already set all the graphics to "At Insertion Point", I was wondering if there was a way I could change this to "Below Current Line" - either through Find/Change or through some plugin.
    I appreciate any/all suggestions related to this topic.
    Thanks,
    Jim

    Hi Jim,
    You could save the documents as MIF and search/replace the correct MIF codes (the MIF files are plain text files). Otherwise, you could use FrameScript or the FDK to do it. If you are interested in a FrameScript solution, please contact me offlist. Thank you very much.
    Rick Quatro
    585-659-8267
    rick at frameexpert dot com

  • Setting CS3 apps as default over CS4 apps

    Hello,
    My company is currently working with CS3 applications. Our vendors use CS4, for this reason, I have a CS4 indesign program installed on my machine. I am having a difficult time setting Indesign CS3 as the default application over the CS4 version.
    I have tried the standard "Get Info" solution (pull down menu to change all documents to open Indesign CS3). After selection "Change All" it immediately reverts to "open with application: to CS4. I have tried using the Choose application dialog and checking the "Always open with" option. This does not work either. Indesign CS 4 is somehow set as the default.
    Does anyone know how to change the default application itself instead of just changing file types?
    My machine:
    OSX.5.8 dual core intel xeon
    CS 3 applications stored on main hard drive applications folder
    CS 4 applications store in my user spefic application folder.
    Any ideas would be very helpful.
    Thanks!
    Maria

    I recommend you search this forum. This seems to hinge on an old registry key in HKEY_CLASSES_ROOT not being updated. Something to do with PhotoshopImage.90 or so. Sorry, I wasn't able to dig this up so quickly, but it's at most 2 weeks old, so you're sure to find it. Look for "file associations" or something like that.
    Mylenium

  • Placing Insertion Point for Images

    Virtually all of the instructions for inserting images in
    Dreamweaver tell you to first "place the insertion point in the
    document where you want the image." How can I (Move) that is place
    the cursor at a particular place on the blank page without using
    carriage returns, tabs, etc that add unnecessary code.
    Thank you for your assistance on what must be a trivial
    matter for those more experienced than I

    You cannot. You must build an HTML infrastructure that allows
    your
    insertion point to be placed where you want it on the page.
    For example, if you want an image to be placed 100px down
    from the top of
    the page, and 100px to the right of the left margin, you
    could do that by
    building an HTML table with a cell that falls at exactly that
    point. Then
    you would just drop the image into that cell.
    See - web authoring is not like using Microsoft Word, or a DT
    Publishing
    application. Unfortunately, you need to have some
    understanding of the
    underlying HTML/CSS to begin to work efficiently.
    Murray --- ICQ 71997575
    Adobe Community Expert
    (If you *MUST* email me, don't LAUGH when you do so!)
    ==================
    http://www.dreamweavermx-templates.com
    - Template Triage!
    http://www.projectseven.com/go
    - DW FAQs, Tutorials & Resources
    http://www.dwfaq.com - DW FAQs,
    Tutorials & Resources
    http://www.macromedia.com/support/search/
    - Macromedia (MM) Technotes
    ==================
    "Intlcom" <[email protected]> wrote in
    message
    news:f2l2p7$7hh$[email protected]..
    > Virtually all of the instructions for inserting images
    in Dreamweaver tell
    > you
    > to first "place the insertion point in the document
    where you want the
    > image."
    > How can I (Move) that is place the cursor at a
    particular place on the
    > blank
    > page without using carriage returns, tabs, etc that add
    unnecessary code.
    >
    > Thank you for your assistance on what must be a trivial
    matter for those
    > more
    > experienced than I
    >

  • [JS CS5] Accessing an inline frame from an insertion point

    Given an insertion point, how can I determine if it contains an inline/anchored frame? And if so, how do I reference the inline/anchored frame?
    I know how to reference the surrounding paragraph, characters, etc., but can't figure out how to get to the inline/anchored graphic.
    I normally would just loop through all the inline graphics in the document, but it this case I need to access the inlines via their insertion points.

    As far as I know, Insertion point can't hold inline/anchored object, but character does.
    If you select text and run this line
    alert(app.selection[0].pageItems.length);
    it will return number of anchor/inline objects inside selected text.
    Another way is to check parent of object. Parent of anchor/inline object is always character.
    Example script that copies all anchor/inline objects to new layer: http://bit.ly/aV9WMF
    Hope that helps.
    Marijan (tomaxxi)
    http://indisnip.wordpress.com/
    http://inditip.wordpress.com/

  • Insertion point on Word doc

    How do I change the size of my insertion point on my word docs? I have trouble finding it on a document sometimes.

    Since this question is about a Microsoft product, you might have more luck getting suggestions if you ask in Microsoft's own forums.
    Regards.

  • Linking FM 9 "At Insertion Point" graphics to an RH 8 project

    Using Technical Communication Suite 2, I have built a structured FM 9 book in order to generate a RH 8 help system. This is a software user guide and I cannot avoid using inline graphics in some body elements. The book only has regular .fm documents (one document per topic), each document has English and French conditions, and I have used the Link command to link the book to a Robohelp project. If I save my FM book as a PDF, everything is perfect, which indicates there are no issues with either the EDD or the EDD_TPL files. In Robohelp, I use an .isf file for modifying RHMapping.css; everything but the following works fine.
    The problem is that upon first linking the book when I create the RH project, RH insists on reading all the inline graphics (set as "At Insertion Point" in FM) as right-aligned paragraphs. There is nothing in my _TPL template that calls for right-aligning anything. Strange thing is that, if I then delete an image in FM and re-insert it, save the file, update the book and then update the RH project, the image is positioned properly in the body element. This would indicate to me that RH 8 is capable of handling inline graphics (like it always has). Needless to say however, that doing this for around 500 inline graphics would be an onerous solution.
    But there is something else.  Deleting and re-inserting the graphic in FM also changes the enclosing element's language condition to "As Is", which is an even greater problem, because I then end up with improper condition-based generation of topics. If I then set the element's condition to what I want it to be, the graphic is right-aligned again in RH.
    I've been raking my brains for a while now and tried all kinds of kludges, in and out of my EDD - to no avail. If anyone else is currently struggling with, or has found a solution to, this problem, I would greatly appreciate hearing from you.
    Thanks

    Hi Mark,
    I looked at the HTML and I see the problem, but didn't see anything specifically controlling this in the CSS. (I don't have much experience with CSS.)
    BTW: I have used your website and Peter Grainge's for help with Help. Thank you!!!
    The issue is:
    There is a line of text in a Frame file (Lettered ptag). In the line of text, there is an anchored frame set to "At Insertion Point." Looks like this:
    3. Click <image in anchored frame> (Add Attachment).
    When the file is linked to RH, it is creates two <p> sections for the text and between those a separate <div> section aligned to the right for the image. This is the HTML:
    <li type="a"><p class="Lettered"><?rh-cbt_start condition="Online, Print, Smart" ?>Click <?rh-cbt_end ?></p>
    <?rh-cbt_start condition="Online, Print, Smart" ?><div align="right">
      <img alt="add_attachments.png" id="image9" src="add_attachments.png"
        style="margin-bottom: -3.000pt; margin-left: 1.500pt; margin-right: 0.882pt;"
        width="18" height="21" border="0" />
    </div><?rh-cbt_end ?>
    <p class="Lettered"><?rh-cbt_start condition="Online, Print, Smart" ?>&#160;<?rh-cbt_end ?><?rh-cbt_start condition="Online, Print, Smart" ?>(Add Attachment).<?rh-cbt_end ?></p></li>
    Appreciate any ideas or CSS suggestions to sort this out.
    Thanks!

Maybe you are looking for

  • Using Firefox, I can't upload an image to a website from my Mac. It works fine with PC's.

    I'm on a 24" iMac, running OSX 10.6.8 My web developer can't replicate the issue, as he's on a PC. If you'd like to investigate, here's the website: myveryowncoffee.com. On the site, you have the option of uploading a photo to create your own label,

  • How can I get a data on a CD onto Ipad?

    I have an iPad and recently lost a lot of content from the device while trying to update it.  When I originally purchased the device I had a friend help in setting it up with his computer as I did not, at the time, have a computer that it could conne

  • Workspace Credential Conflict between Logged-in User and the Authenticated User

    Hi there, I am running LiveCycle ES Update1 SP2 with Process Management component on WIN/JBoss/SQL Server 2005. I have been encountering user credential conflicts from time to time, but it has not been consistent and the problem manifested in various

  • Problem while starting OC4JInstance

    Hi People, I have installed forms 6i with oracle 9i.when i tend to run my form i couldnt start OC4JInstance.it gets started and gets closed automatically.without OC4 its throwing me the error as, FRM-10142 HTTP listener is not running on computer_nam

  • Encryption problem caused by Adobe?

    Dear All, I am a video editor and exchange files with my collaborator via the cloud, but not via Adobe Cloud which does not allow .mp4 files to be sent due to copyright problems.  My cloud service is not allowing my collaborator to view my latest .mp