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

Similar Messages

  • How can I change the insert SWF File, I need to add a few things and make it better?

    How can I change the insert SWF File, I need to add a few things and make it better? Is there an option inside of the dreamweaver menu that I am not looking at. It would make it easier on me if I changed some things around and didn't have to do it all myself each time I used it. Just incase you was needing to remember what swf flash was, It is not a swf video either.
      <object id="FlashID" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="640" height="480">
        <param name="movie" value="Sonic Kaboom.swf">
        <param name="quality" value="high">
        <param name="wmode" value="opaque">
        <param name="swfversion" value="9.0.115.0">
        <!-- This param tag prompts users with Flash Player 6.0 r65 and higher to download the latest version of Flash Player. Delete it if you don’t want users to see the prompt. -->
        <param name="expressinstall" value="../Scripts/expressInstall.swf">
        <!-- Next object tag is for non-IE browsers. So hide it from IE using IECC. -->
        <!--[if !IE]>-->
        <object type="application/x-shockwave-flash" data="Sonic Kaboom.swf" width="640" height="480">
          <!--<![endif]-->
          <param name="quality" value="high">
          <param name="wmode" value="opaque">
          <param name="swfversion" value="9.0.115.0">
          <param name="expressinstall" value="../Scripts/expressInstall.swf">
          <!-- The browser displays the following alternative content for users with Flash Player 6.0 and older. -->
          <div>
            <h4>Content on this page requires a newer version of Adobe Flash Player.</h4>
            <p><a href="http://www.adobe.com/go/getflashplayer"><img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player" width="112" height="33" /></a></p>
          </div>
          <!--[if !IE]>-->
        </object>
        <!--<![endif]-->
      </object>
    </div>

    If I understand correctly, Sonic Kaboom.swf needs to be edited in a separate Flash authoring program and then reinserted into your HTML document. 
    As Murray said, Flash is dead.  Nobody uses it anymore.   We use HTML5, CSS3 and JavaScript animations which have universal support from Smartphones, Tablets and other web devices that can't support Flash.   Look at Edge Animate.
    HTML animation | Download free Adobe Edge Animate CC trial
    Nancy O.

  • How can I set the insert date to auto update in Pages 5.2.2

    how can I set the insert date to auto update in Pages 5.2.2
    I am attempting to have the date in header auto update in a Pages file.
    I can insert it, but where is the AUTO UPDATE selection
    OS10.9.4
    thank you

    Apple never included the auto-update feature for dates in Pages v5.2.2. You would have to single-click the date, and deliberately update it.
    If you have Pages ’09 v4.3 in /Applications/iWork '09, then it will allow you to configure auto-update of the date field. Right-click on the date, set the format, and click the selection for automatically update on open.

  • [iPad] How can I get the popoverController pointer in the viewController

    UIViewController* viewController = [[UIViewController alloc] init];
    UINavigationController* navcontroller = [[UINavigationController alloc] initWithRootViewController:viewController];
    UIPopoverController* aPopover = [[UIPopoverController alloc] initWithContentViewController:navcontroller];
    [aPopover presentPopoverFromBarButtonItem:buttonID permittedArrowDirections:arrowDirections animated:YES]; // popup the popoverView
    precondition:I can't pass the popoverController point to the viewController directly.
    How can I get the popoverController pointer in the viewController?
    I try to use the following function, but it can't get the popoverController:
    self.navigationController.parentViewController
    Message was edited by: MarginD

    There is no "book box in preferences' general".
    There is a new iBooks application that appears on Mavericks' dock.  It looks like this:
    Go there to add books from your Mac to your iPad.

  • How can I find the vanishing point with Labview?

    I am using a myRIO for developing a system for helping visually imapaired people in their navigation. I have already done the image processing of what is being aquired by the camera (edge detection and finding of straight lines).
    How can I fin the vanishing point from the two edges of a path in an image with LabVIEW? Is there any special function that I can use?
    Thank you!
    Solved!
    Go to Solution.

    The vanishing point is the intersect of two lines, right? 
    https://www.google.com/webhp?sourceid=chrome-insta​nt&ion=1&espv=2&ie=UTF-8#q=intersect%20point%20of%​...
    Machine Vision, Robotics, Embedded Systems, Surveillance
    www.movimed.com - Custom Imaging Solutions

  • I have just installed a 2TB time capsule on my iMac i7, it see my second 1TB hard drive but the 256 SSD doesn't come up in the list of hard drives I can back up. How can I enable the time machine to see my first SSD 256gb hard drive?

    I have just installed a 2TB time capsule on my iMac i7, it see my second 1TB hard drive but the 256 SSD doesn't come up in the list of hard drives I can back up. How can I enable the time machine to see my first SSD 256gb hard drive?

    iLife is preinstalled on all the Macs. If you purchased iLife in the App Store or your computer came without DVDs, open App Store > Purchases and download the applications. If your Mac came with discs, insert the Applications DVD and install iLife applications

  • How can I reduce the amount of space between paragraphs in Pages?

    How can I reduce the amount of space between paragraphs in Pages?

    Let's pretend that you told us which version of Pages you are talking about, and that you are using Pages 5:
    click in the text > Format > Spacing > click on triangle to expand options > change Before/After
    Peter

  • How can i pull the payment transactions for each invoice?

    Hi folks
    iam developing report for following requirement.
    want to disply the vendor transaction file for all company codes Fiscal year,of 2004,2005,2006, and 2007 (to date).
    The purpose of oureport is to analyze our company invoices and investigate potential overpayment opportunities. In order to effectively accomplish this, we need a single invoice record for each invoice that was received by compnay from their vendors. The single invoice record would contain at least the following columns: Vendor Number, Vendor Invoice Number, Invoice Date, Invoice Amount, SAP Document Number, Check/Wire Number, Check/Wire Date, Check/Wire Amount. SAP would have multiple rows in a table for any one invoice, whereas we would only want to see ONE row for every vendor invoice.
    if you know that company pays (for example) 75,000 invoices/year - then the transaction file you would have about 300,000 records in it. 75,000 Invoices * 4 years.
    inodrer to develop this report iam using table PAYR -payee
    BSIK ( closed items) BSAK ( open items).
    my question is any one tell me how can write logic to  pull the payment transactions for each invoice?
    regards
    neeru

    Hi rob,
    yes you are right,  an invovice may contaion duplicate records
    example  PAYR table contain
    invice no         compnay code  checkno vendor  fisclyear
    ( doc.number)
    2000134373     001                    10287200          2007
    2000134373     001                    10427890          2007
    so as per my requirement how can i write the logic.
    regards
    neeru

  • APEX4-How can I see the insert sql apex is creating to insert form into db?

    Hi,
    I've a table with around 78 columns and a form to submit the values. Till around 68 columns it was working fine, when I added another 10 fields and modified names of few other, on clicking Create or Apply it throws duplicate column name error. I've given the exact error below.
    How can I find out which is the duplicate column? or where the problem lies? The form is quite big and complex so I don't want to recreate it.
    Is it possible for me to see the sql apex is generating to insert or update the value?
    When I try to create a new entry, application throws this error:
    ORA-06550: line 1, column 79: PL/SQL: ORA-00957: duplicate column name ORA-06550: line 1, column 7: PL/SQL: SQL Statement ignored
    On editing an existing entry, application throws error:
    ORA-20505: Error in DML: p_rowid=181, p_alt_rowid=RT_ID, p_rowid2=, p_alt_rowid2=. ORA-00957: duplicate column name
    Thanks for you time.
    Thanks,
    Hozy

    Fixed, I was referring to same column name twice.

  • How can I control the mask point?

    Hi everyone.
    How can I control point in the circle by using the Expression???
    Is it possible?

    There's no direct and easy way to control individual mask path vertices with expressions, but it is possible.
    Christopher Green has a script (Connect_Vertex_To_Point.jsx) on his website that attaches a vertex to a control point. You can use that script to figure out how to do something similar.
    I'll try to put something more direct together myself.

  • How can I reset the anchor point to its default?

    One of the other guy using my machine screwed up the default anchor point position for text layers & for the life of us, we can't figure out how to reset it back to its default (centered on the text layer).
    Right now, it appears a the bottom of the text layer (bottom left if left justified, bottom right if the text is right justified & bottom center if cerer justified).
    Just to be clear, when typing out a brand new text layer, the anchor point does not appear in the center of the layer, as it normally does. Hitting "reset" in the tranform controls always moves the AP back to this position (ie, if I use the pan-behind tool to put the AP where it needs to be, then hit "reset", the AP moves back to the lower left corner of the layer)
    I'm sure it's got to be some keystroke combination of some kind...
    Anyway, does anyone know how to set it back to its default? It's a pretty big pain to have to manually set the anchor point for every text layer, and I kinda want to leave the "delete-your-prefs" option as a last resort...
    thanks
    D

    As Rick said - there is no way in hell the text ever could have been perfectly centered to begin with. the behavior you are seeing is perfectly normal. Whenever you change the text, the anchor point will respond in kind. Only fixed size text blocks will reverse that principle and fit the content to the bounding box, leaving the anchor point unchanged.
    Mylenium

  • How can I move the Anchor points of multiple layers to the same position within comp?

    I have a comp of a butterfly that I want to copy the keyframes to many other butterfly comps, but to get the animation to work, I need all the anchorpoints of the individual layers to be at the exact same location within the comp (So the left wing, right wing, and body anchor points are right on top of each other)
    How can I accomplish this quickly? I have a lt of comps to do...
    Thanks all!

    I would have set this up in Illustrator Before you started. Start with a rectangle that has either fill or stroke on a layer but the opacity is set to 0. The center of the rectangle will be the anchor point for that layer when you import as a comp maintaining layer size. Now create your left left side contents on the left side of the rectangle and repeat for the right side. Import as a comp and you'll be golden.
    Here is a sample file and what the file looks like imported as a comp. Notice the x values of all anchor points are identical.
    The artwork isn't great, it was created in less than a minute but it porves the workflow.

  • In STO Process How can i Change the shipping point manually

    Hi,
    I need clarification in STO process, shipping point determined automatically based on ovl2 setting like Shipping condition from customer master loading group from material master plant in the line item.(here the shipping point is1000.)
    In my scenario it picking correctly shipping point(1000) even i have maintained manually shipping point(1200) in ovl2 but when i am creating STO document UB change shipping point at item level in shipping tab system allowing the manual shipping point (1200) but when i enter or save the document system overwrite 1200 to 1000,system consider only automatic determination  in shipping point (1000)
    Can you please help why i am not able to change the manually shipping point 1200( even i maintained  in ovl2 manually shipping point 1200)

    Sending a calendar to another country is not supported in many jurisdictions - as it can lead to extra charges for the receiver. As I have no idea what country you are in you can select your country from this list
    http://store.apple.com/us/help/print_products/routing
    And find out if it's supported in your country and to your chosen destination.
    Regards
    TD

  • How can i change the mouse pointer image?

    Hi friends!!
    It's possible to change the mouse pointer image in Swing?
    Thanks a lot.

    There's a setCursor() method on the frame component.

  • How can I add the file numbers to each photo as a batch in photoshop on a mac?

    Can anyone tell me how I can add the file numbers of each individual photo to the picture and do it as a batch?

    Have a look here http://www.dmxzone.com/go?12067
    Gramps

Maybe you are looking for

  • Como obter o CNPJ do PN se o endereço de entrega padrão é de outra empresa?

    Pessoal, Preciso gerar um relatório com as seguintes informações dos Clientes: Código, Razão, Endereço (Tipo, Rua/Caixa, Complemento, Bairro, ...),  CNPJ e Inscrição Estadual; Porém verifiquei que as identificações fiscais (CNPJ, IE, ..) que ficam ar

  • How can i validate current row input text field like required.

    Hi All, jdev 11.1.2.1.0 in my use case i have drag drop one viewobject as a adf table. and in table i have also add one extra input text field which is not based on vo. now i want to validate current row input text field not null when i commit row. b

  • Headphones versus speakers on a Mac Mini with Mac OSX 10.4.11

    I just purchased a pair of headphones for my Mac Mini. I plugged the headphones into the headphone jack on the back of my Mac Mini. I pressed the Mute button to use the headphones and clicked on a music video but no sound came through the headphones.

  • Too many TPC sockets opened for a single IP

    Hi there, I am running a ColdFusion server on a VPS to HostMySite.com and lately we are having strange problems with it. Every few minutes the server is not responding even if we restart the services - IIS and ColdFusion - and even the whole system.

  • Start Element - Default Date - Error

    Hi, We have NW04s SP7 Portal and our VC version is VC Server Version is 645.7.1.0. 1. In some scenarios we want some default list (data from SAP R/3) to be displayed by passing system date, i tried using NOW() option, it is not working.In our report