Problem setting paragraph style using FindChangeByList

am trying to apply a paragraph style using FindChangeByList. I can apply character styles but not paragraph styles.
I need to apply the paragraph style "price" to every paragraph that begins with a "$"
I have tried it everyway I can think of.
any suggestions?

Hi Carolyn,
Try something like this (assuming JavaScript, and also assuming that the paragraph style is not in a paragraph style group):
text<tab>{findWhat:"$"}<tab>{appliedParagraphStyle:app.documents.item(0).paragraphStyles.i tem("price")}<tab>{includeFootnotes:true, includeMasterPages:true, includeHiddenLayers:true, wholeWord:false}
(Where <tab> is a tab character.)
Thanks,
Ole

Similar Messages

  • [CS3 AS] set paragraph style, go to next paragraph, set paragraph style, etc.

    hello,
    i'm pretty much a noob at scripting. i'd like to automate applying paragraph styles to a document with reviews.
    basically, i want to place the cursor in a paragraph (manually), and have a script do the following: set paragraph style 5, go to the next paragraph, set paragraph style 1, go to the next paragraph, set paragraph style 2, go to the next paragraph, set paragraph style 3.
    help?
    (i specified AS as i think i might understand it, but JS probably works as well)

    Assuming you set the relationship of one style to the next using the 'Next Style' definition in the paragraph styles, then the following should do the trick (assuming you have your cursor in the first paragraph).
    > // Follows next paragraph style setting until Same Style or No Paragraph Style
    >// Get the current pagaraph based on user cursor location
    var myCurrentParagraph = app.documents[0].selection[0].paragraphs[0];
    do
    ] // Currently applied paragraph style
    var myCurrentParagraphStyle = myCurrentParagraph.appliedParagraphStyle;
    ] // Next Style for current paragraph style
    var myNextParagraphStyle = myCurrentParagraph.appliedParagraphStyle.nextStyle;
    ] // Check current style and next style are not the same or No Paragraph Style
    if (myCurrentParagraphStyle == myNextParagraphStyle
    || myNextParagraphStyle == app.documents[0].paragraphStyles.item("[No Paragraph Style]") ) {
    ]] exit(); }
    ] // Get next paragraph in chain
    var myNextParagraph = myCurrentParagraph.insertionPoints[-1].paragraphs[0];
    ] // If we are end of story then stop
    if (myNextParagraph == myCurrentParagraph) { exit(); }
    ] // Apply next style to next paragraph
    myNextParagraph.appliedParagraphStyle = myNextParagraphStyle;
    ] // Restart the process
    myCurrentParagraph = myNextParagraph;
    >while (true)
    Note that the process will end when the Next Style setting of one paragraphs is Same Style or when the Next Style is No Paragraph Style. There would be other ways to end the process, such as limiting it to a certain number of steps if the number of steps was always the same. Let me know.

  • Framemaker 8 problem with paragraph styles

    Hi,
    I manage a documentation (one file) including paragraph styles organized like that :
    -- Chapter
         |--- Sub chapter
           |--- Sub Sub chapter
    My question is simple
    When a create a PDF file from my document, including bookmarks, I'm encountering the following problem :
    The "chapter 4", "sub chapter 4" and "sub sub chapter 4" paragraphs are created correctly. The bookmarks are created with the correct place.
    Like that :
    |---- chapter 4
      |---- sub chapter 4
       |----- sub sub chapter 4
    BUT
    The "sub sub chapter "5 paragraph styles are created into the "Chapter 4" structure, added with the "sub sub chapter" of Chapter 4. And the Chapter 5 just contains the "chapter 5" and "sub chapter 5" bookmarks.
    Like that :
    Chapter 4
        |---- sub chapter 4
           |---- sub sub chapter 4
           |---- sub sub chapter 5
    Chapter 5
       |--- sub chapter 5
    After checking the structure of my document, I do not find any thing which could create this problem.
    The paragraph styles seems to be correct.
    Thank you so so much to help me because I don't know how to replace the "sub sub chapter 5" below the" sub chapter 5".
    Phil ;o)

    There are a few ways to go with this. One is to put all the files in a Book,
    temporarily, and set the one with the correct style definition as the
    source, then synchronize the paragraph styles. This will change ALL styles
    with the same names throughout all the documents, and add any styles that
    are present in the source, but not in one of the other files, so it is a bit
    risky, especially if any styles are based on or [Basic
    Paragraph] itself is used in one of the files and it isn't already defined
    exactly the same in all files.
    You can also open any file and go to the Paragraph Styles panel menu and
    choose Load Styles, then select the style you want to load, and how to
    handle a conflict (Use Incoming), which will give you more control over what
    happens.
    Or each time you open a file and get the missing font warning you can go to
    Find Font and select the missing font, then pcik your substitute, check the
    redefine styles box, and click Change All. This would probably be the best
    choice since it doesn't depend on style names to make the correct changes.

  • Problem applying Paragraph styles in CS4 InDesign

    I boughtCS4 InDesign for Windows perhaps six months ago, and it worked fine with Windows XP. I have recently installed Windows 7 and find that the paragraph styles won't always work. Of ten when I try to use the shortcut for paragraph style the paragraph in question turns pink with small squares in it. If I undo the application of paragraph styles it goes back to text. I am using Times New Roman as the major font. However, I have tried other fonts and they won't work in paragraph style either.
    I tried changing several pages of the manuscript to Times New Roman Special G1, but it won't do the commas, quotes, etc. (special characters).
    Has anyone else had this problem? What can I do to fix this mess?
    Thanks for any help.
    Earl Davis

    Well, here's the situation now. But before describing it, let me thank Peter
    Spier and Bob Levine who have endeavored to help me. Now, here's where we
    are:
    I copied a document over from Pagemaker into InDesign using Times New Roman
    font. (I did the same for two other book manuscripts this past summer,
    shortly after purchasing InDesign and had no problem). Suddenly a couple
    weeks ago I found that the shortcut I set for the paragraph styles did not
    format the paragraphs, etc., but rather turned the paragraph in which I
    placed the cursor into a series of pink squares highlighted in pink. I have
    tried the suggestions you fellows have given, such as copying the fonts
    presently in the Windows Font Directory into the Adobe/InDesign/Fonts
    directory, and then right-clicking on them and installing them. By the way,
    the InDesign font directory only had the Times New Roman and Times New Roman
    Special 1 and Renaissance font in it, until I copied all my fonts there and
    installed them. Another oddity, I make the first letter of the first
    paragraph of each chapter a decorative Renaissance font, spanning two lines.
    I now find that when I do that, I may get a black square, which may turn
    into the correct font after I adjust the size to two lines.
       But on the general problem, I have tried changing the font in the
    paragraph styles to Amerigo BT, and I sometimes get the shortcut to work,
    and sometimes it still turns it into Times New Roman Special or black
    squares. Also, I have opened a new file and put another copy of the text in
    it, setting up the paragraph styles, etc. and still have the same problem.
       So I'm at a loss what to do.  I do think it's possible I am doing
    something wrong with fonts or setting up the paragraph styles, but I don't
    see any errors there. All my computer fonts show up in the fonts panel of
    the document.  Any more ideas?

  • Problem with paragraph style overrides and character formatting

    I've had this problem for a long time, and sometimes it resolves itself, sometimes it doesn't. Finally I'm begging for help.
    I am typesetting academic articles into a journal.  We use endnotes. The endnotes have both italic and regular formatting--italics for book and journal titles, and foreign phrases.
    Sometimes when I place the text, the formatting reverts to whatever it was in Word.  To try to fix that, I've begun stripping the Word formatting from the original document, making everything "Courier New" and just importing it like that.  I figured this would clear a lot of the problems I've had with fiddly formatting issues.
    I was mistaken. 
    Here is what happens:
    When I place the document it comes up in the original Courier New font, with italics and other formatting intact.  If I click "article style" which is the main article paragraph  style format, normally it changes.  but if I right click and select "apply article style" it is more likely to change the paragraph to the proper style, with italics and other formatting still intact.
    But when it gets to endnotes, I'm sort of screwed.
    My endnotes style is a bulletted style, so that I can have the endnote numbers consistent.  but this seems to screw all the style formatting.
    Here is what I do:
    With the cursor in endnote text, I click "bulleted endnote style".  The character format remains the same, with a + beside the style. The endnote number format is different, however.  If I click "clear overrides" it does in fact change to the proper formatting, but it strips any italics or other character in the text.  This is frustrating because many of these endnotes have lots of italicized journal and book titles, and it takes a long time to figure out which ones I need to reitalicize manually.
    I have tried to use the "customize style import>Style mapping" but it has not fixed anything.
    Please help me figure out how to make these transitions more smoothly.  I am open to suggestions both on how to make the changes once the document is placed in the Indesign file, and also making modifications to formats in the native Word file so that I don't have these problems. 
    Thanks
    Dan

    Sorry, that last message wasn't supposed to send (if that's not obvious!). I was writing it and got interrupted.  Damn iphone. 
    I know why there are two numbers.  This is not an issue. What I didn't finish writing was that, the note number before i bullet it is a different font/ format. Again, not a problem.  Here is something interesting, though.  If I delete that original number by placing the cursor in the middle of it (say a between the 4 and 2 of 42) then delete everything by Shift+arrow forward, press delete then delete the rest of the unnecessary characters, THEN apply the style formatting, it works just fine.  Is it something to do with the character codes of those original note numbers? 
    Word drops in so many hidden codes that it screws everything up!

  • InDesign cs5 keeps crashing whenever I try to alter the footnote formatting via Type Document Footnote Option or Paragraph Styles using Span Columns

    InDesign cs5 crashes whenever I try to alter the footnote formatting by going to Type > Document Footnote Option > and then I try to select a Paragraph style I've already set up. The Paragraph style I need to use includes Span Columns, which I think may be the issue. I think this because when I then I tried to create a new document and re-import the styles, it won't even let me add Span Columns feature to the Paragraph Style in question.
    I can send screen shots of everything (e.g. dialog boxes) if that would be helpful in understanding the issue I'm having.
    Any help would be greatly appreciated!!!!!!!!!!
    Thanks.

    It does require running a script to accomplish what you want. Here's the one usually recommended:
    http://www.kahrel.plus.com/indesign/footnotes_columns.html
    Here are instructions for installing scripts:
    How to Install a Script in InDesign That You Found in a Forum or ...

  • I'm having problems with paragraph style. It remains last style even if I aplply basic paragraph style

    Paragraph style is not working properly in either two licences if got for CC InDesign 2014.2
    Styles do not apply correctly, it remains last style applied even if I aplply basic paragraph style.
    Is anybody having the same problem? Do you have any explanation or solution for it? Is there any spanish chat or forum?
    I appreciate your quick answer

    There is a Spanish forum here: Foro en español. Is there a character style applied to the text?

  • Problem Saving Paragraph Styles

    For some reason Pages does not want to save paragraph styles across all documents. when I create a new one in one document and save the document the style is saved but only in that document. when I create a new document the style I just made isnt avaliable. Is there a preference I can check to make sure all styles are saved across all documents I make in the future?

    Welcome to Apple Discussions
    Styles are specific to each document. You need to create your own default template. Set up your document with the margins, headers, etc. as you'd like. Redefine all of the paragraph & character styles to have your desired font.
    While you're at it, you might want to set default styles for all objects, text boxes, tables, paragraph styles, etc. Start with a blank document & insert an object. Change the color, wrap, etc. to your choosing & then go to Format > Advanced > Define Default Shape Style then delete the object. Repeat with an image/photo, a text box & a table.
    Now, save this as a template then, in Pages > Preferences, select this template as the default for new documents. All of your new documents will have these settings for inserted objects, images & tables. Unfortunately, the settings won't apply to any other templates or "foreign" documents you open with Pages.

  • Programming paragraph styles using the Javascript

    I am exporting xml into a  indesign template and then creating a .jpeg programmaticatlly.  On conversion, is there anyway to format the xml so that paragraph styles are applied?

    Let me be clear:
    1.  We have some xml i.e.
    <?xml version="1.0"?><Root Customer="BusinessCard" xmlns="" ID="0"><Story><Story><Field ID="1" Label="Fullname" Type="TextBox" Required="True" Prefix="" Suffix="" RegEx="">JohnDoe</Field><Field ID="2" Label="Job Title" Type="TextBox" Required="False" Prefix="" Suffix="" RegEx=""></Field><Field ID="3" Label="Telephone" Type="TextBox" Required="False" Prefix="T   " Suffix="&#xd;" RegEx="">T   0123456456&#xd;</Field><Field ID="5" Label="Mobile" Type="TextBox" Required="False" Prefix="M  " Suffix="&#xd;" RegEx="">M  0123456789&#xd;</Field><Field ID="6" Label="Email" Type="TextBox" Required="True" Prefix="" Suffix="" RegEx="">[email protected]</Field></Story><Field ID="7" Label="Address1" Type="TextBox" Required="False" Prefix="" Suffix="&#xd;" RegEx="">&#xd;</Field><Field ID="8" Label="Address2" Type="TextBox" Required="False" Prefix="" Suffix="&#xd;" RegEx="">&#xd;</Field><Field ID="9" Label="Address3" Type="TextBox" Required="False" Prefix="" Suffix="&#xd;" RegEx="">Middlesex T5 4566&#xd;</Field><Field ID="11" Label="Postcode" Type="TextBox" Required="False" Prefix="" Suffix="" RegEx="">Visit uytyu</Field></Story></Root>
    2  We have an indesign template. template.indd
    3. We import the xml into the template programatically and need to apply character styles to the prefixes on mobile, and telephone numbers.
    4.  We need to apply the character styles in the .jsx script  that then exports the image as a jpeg and a pdf.

  • Problems setting up PPP using GSM modem

    I am trying to setup a PC with Solaris 10 installed to use a 3G USB modem to connect to the internet.
    bash-3.00# cat /etc/release
    Solaris 10 10/09 s10x_u8wos_08a X86
    bash-3.00# uname -a
    SunOS gateway 5.10 Generic_141445-09 i86pc i386 i86pc
    I have the modem working in so far as I can tip to it and get a response back:-
    bash-3.00# tip -460800 /dev/cua/0
    connected
    at
    OK
    ati
    Manufacturer: huawei
    Model: E17X
    Revision: 11.311.05.02.67
    IMEI: 358108024400748
    GCAP: CGSM,+FCLASS,+DS
    OK
    ~
    [EOT]
    when I run the following command: pppd debug call mtn
    I get the following in the pppd log:-
    Aug 7 19:44:00 gateway pppd[463]: [ID 860527 daemon.notice] pppd 2.4.0b1 (Sun Microsystems, Inc.) started by root, uid 0
    Aug 7 19:44:00 gateway pppd[463]: [ID 702911 daemon.debug] serial speed set to 460800 bps
    Aug 7 19:44:01 gateway pppd[463]: [ID 702911 daemon.debug] connect option: '/usr/bin/chat -Vv -f /etc/ppp/mtn-connect' started (pid 464)
    Aug 7 19:44:02 gateway chat[465]: [ID 702911 local2.info] timeout set to 5 seconds
    Aug 7 19:44:02 gateway chat[465]: [ID 702911 local2.info] abort on (\nBUSY\r)
    Aug 7 19:44:02 gateway chat[465]: [ID 702911 local2.info] abort on (\nERROR\r)
    Aug 7 19:44:02 gateway chat[465]: [ID 702911 local2.info] abort on (\nNO ANSWER\r)
    Aug 7 19:44:02 gateway chat[465]: [ID 702911 local2.info] abort on (\nNO CARRIER\r)
    Aug 7 19:44:02 gateway chat[465]: [ID 702911 local2.info] abort on (\nNO DIALTONE\r)
    Aug 7 19:44:02 gateway chat[465]: [ID 702911 local2.info] abort on (\nRINGING\r\n\r\nRINGING\r)
    Aug 7 19:44:02 gateway chat[465]: [ID 702911 local2.info] report (CONNECT)
    Aug 7 19:44:02 gateway chat[465]: [ID 702911 local2.info] expect (OK)
    Aug 7 19:44:07 gateway chat[465]: [ID 702911 local2.info] alarm
    Aug 7 19:44:07 gateway chat[465]: [ID 702911 local2.info] Failed
    Aug 7 19:44:07 gateway pppd[463]: [ID 702911 daemon.error] Connect script failed
    Aug 7 19:44:08 gateway pppd[463]: [ID 834084 daemon.info] Exit.
    the peer file is as follows:-
    bash-3.00# more /etc/ppp/peers/mtn
    # MTN PPP initialisation/termination script
    # Do not ask the remote to authenticate.
    noauth
    # Modem chat scripts
    connect "/usr/bin/chat -Vv -f /etc/ppp/mtn-connect"
    disconnect "/usr/bin/chat -Vv -f /etc/ppp/mtn-disconnect"
    # Serial device to which the modem is connected.
    /dev/cua/0
    # Speed of the serial line.
    460800
    # Use this connection as the default route.
    defaultroute
    # ISP supplies us with a local IP address during IPCP negotiation
    noipdefault
    # Try to get the name server addresses from the ISP.
    usepeerdns
    # Username for authentication
    user "username"
    # Password for authentication
    password "password"
    # Always try to reconnect, when connection fails or is lost
    # persist
    # Never give up after failed connect attempts
    # maxfail 0
    # Debugging
    debug
    and the connect script is as follows:-
    # MTN PPP CONNECT script
    TIMEOUT 5
    ECHO ON
    ABORT '\nBUSY\r'
    ABORT '\nERROR\r'
    ABORT '\nNO ANSWER\r'
    ABORT '\nNO CARRIER\r'
    ABORT '\nNO DIALTONE\r'
    ABORT '\nRINGING\r\n\r\nRINGING\r'
    REPORT CONNECT
    OK 'ATZ'
    OK 'AT+cgdcont=1,"IP","apn1.mtn.net"'
    OK 'AT+cgdcont=2,"IP","apn2.mtn.net"'
    OK 'ATD*99***1#'
    I am sure I have missed something really obvious but I can't see where.

    Don't use the setup CD.  Connect manually via wired computer to 192.168.1.1 username blank, password 'admin'.  Now configure the router manually like everyone else.

  • Problems setting up WRT310N using setup disk

    I have cable internet. I can connect straight to the cable modem and get internet. I start the Linkys disk and it gets to step 4/4 (where i have connected all the wires to the router/modem/computer and am told to plug in the router.) The router powers up but after a few minutes, the installer says it can't connect to the router, make sue I'm not connecting to an old router, etc... How do I get past this step?
    It's worked once before, the first time I installed it, but the router was reset last night and now it's a no go.

    Don't use the setup CD.  Connect manually via wired computer to 192.168.1.1 username blank, password 'admin'.  Now configure the router manually like everyone else.

  • How to set textbox style using .setStyle()

    I want to make it so that when a submit button is clicked, if
    an input textbox is blank, it will return a message in RED text.
    But if they have entered a value for it to return a message in the
    input box with GREEN text. So far this is my code, but it doesn't
    change the color of the text:
    check_btn.onPress = function() {
    for (i=1; i<9; i++) {
    if (_root["input"+i] != "") {
    _root["input"+i].setStyle("fontColor", 0x00FF00);
    _root["input"+i] = _root["answ_"+i];
    if (_root["input"+i] == "") {
    _root["input"+i].setStyle("fontColor", 0xFF0000);
    _root["input"+i] = "Please type an answer here.";
    I would apreciate any suggestion.
    Text
    Text
    Text
    Text

    TextFormat();

  • AppleScript Pages: How to set "following paragraph style"?

    How do you set "following paragraph style" for paragraphs or paragraph styles using AppleScript?
    I've tried several approaches, and all cause a run-time gag with the netorious error -10000
    More generically, what is the syntax for changing a property of a paragraph style that was user created?
    TIA!

    JonRKibler wrote:
    How do you set "following paragraph style" for paragraphs
    Here's an example that changes the following paragraph style of the first four paragraphs :
    tell application "Pages" to tell front document
          set following paragraph style of paragraphs 1 thru 4 to paragraph style "Heading 1"
    end tell
    JonRKibler wrote:
    How do you set "following paragraph style" for paragraph styles using AppleScript?
    Here's an example that changes the following paragraph style  of the paragraph style "Heading 1" :
    tell application "Pages" to tell front document
          set following paragraph style of paragraph style "Heading 1" to paragraph style "Heading 2"
    end tell
    JonRKibler wrote:
    More generically, what is the syntax for changing a property of a paragraph style that was user created?
    If you know the name of the style, here's an example that changes the value of the space before :
    tell application "Pages" to tell front document
          set space before of paragraph style "xyz" to 14
    end tell

  • I want to open "Paragraph Style Options" dialogue using Script(jsx)

    Hi,
    I have created a paragraph style using JSX.
    var myDocument = app.activeDocument;
    var myParagraphStyle = myDocument.paragraphStyles.item("myParagraphStyle");
    Now I want to edit my paragraph style using the "Paragraph Style Options" window. How can I open the window for myParagraphStyle using JSX?
    Is there any way to do it? I don't want to manually double click the name in the list to open it.

    @kapoor_aman27 – with a little trick we could select a distinct paragraph style in the Paragraphs Style panel.
    Add a new text frame to the document, add some contents, one character is sufficient. Format its contents with your paragraph style. Set the Paragraph Styles panel to visible. Select the text in the text frame with something like that: app.select(myTextFrame.texts[0]). Remove the text frame; the paragraph style stays selected in the panel.
    The next step would be to invoke the "Paragraph Style Options" panel. The id for the appropriate scriptMenuAction is 8481.
    try{
    app.scriptMenuActions.itemByID(8481).invoke();
    }catch(e){$.writeln(e.message)};
    But unfortunately this would throw an error. Something like this:
    (Error message in German:)
    "Mit der angeforderten Aktion wurde ein asynchrones, modales Dialogfeld geöffnet,
    für das eine Vorschau erstellt werden kann.
    Dies ist nicht mit der Skriptarchitektur kompatibel, daher wurde das Dialogfeld
    mit der Standardschaltfläche automatisch verworfen."
    (Roughly translated to English:)
    "An asynchronous, modal dialog box was opened by this action.
    A preview can be created with that dialog box.
    This is not compatible with the scripting architecture, therefore the dialog box
    with the standard button was automatically rejected."
    So I see no chance to do what you want.
    (Tested with inDesign CS5.5 on Mac OSX 10.6.8)
    Don't know, if that behavior has changed for more recent versions of inDesign…
    Uwe

  • Problems setting up used ipa2 with ios7 due to Find My My Ipad Feature being left on by previous owner

    Hi!! Im having problems setting up a used ipad 2.with ios7. The previous owner forgot to turn off the find my ipad feature so now its asking me for her itunes username an password. I dont have that info and i lost her phone number

    yes my friend ios 7 was already loaded on when i bought it.    The person who sold it to me left the find my ipad feature ON. I called her and she said she would be in the next day to buy it back and since i actually belived her  i threw away her phone number. i dont know what i was thinking

Maybe you are looking for

  • Back ground Job Creation  and maintanance ?

    Gurus I have a report, which will take more than the normal 10 min time. ISo i have to run it in the back ground session. Please let me know how to create a back grund job and maintain and process it? Also please tell me the Tcodes associated with th

  • Ipod classic and connecting to my TV

    Hi, I'm really confused as to what cable I need, to connect my Ipod Classic to television, either via component video etc. I have a belkin cable I had with my previous ipod and it worked fine with that - but not this one!

  • Issue in B2C payment option scenario.

    Hi All, We have noticed a bug in the java program of the E-Commerce application. In the B2C scenario, if the user has selected "Quote Only" as the payment type and when there are no warnings, the status of the sales order is still remaining as "1", w

  • Java.lang.​IllegalSta​teExceptio​n in HelloWorld​Demo

    Hi, I am a a total newbee to Blackberry JDE development. I was trying to run the HelloWorld Demo. I have Blackberry JDE 4.6.1, Java JDK 1.6 Update 24. When I try to run the demo app I get the java.lang.IllegalStateException while starting net_rim_tid

  • Catalog Manager crashing - JVM Terminated. Exit code=1

    I have to localize my project. I'm trying to use Catalog Manager to export out the Captions from the catalog. Here on my Windows box I have done this against my local OBIEE (10.1.3.4), using a very, very small catalog, just as a proof of concept. It