Search a paragraph style next to other paragraph style...

I need search a paragraph style ("AAA") next to other paragraph style ("BBB"), and modifiy in this case ("BBB" to "BBB+")  with a "spaceBefore" of 3 mm...
My code don't work...
Please, help me...!!!

Try something like this:
for (i = 0; i < myFoundParagraphs.length; i++){
    try {
        var myNextPar = myFoundParagraphs.nextItem(myFoundParagraphs[i]);
        if (myFoundParagraphs[i].appliedParagraphStyle.name == "AAA" && myNextPar.appliedParagraphStyle.name == "BBB"){
            myFoundParagraphs[i].spaceBefore = 3;
    catch (myError){}             

Similar Messages

  • Search for paragraph overrides

    In CS 3, is there a way to search for paragraph overrides? I can "clear all overrides," but I'm concerned that this might make other, unwanted changes to my document. If I know there are no overrides, then I won't worrry about clearing them.

    I have this script preservelocalformatting.jsx and when I import text from word I execute the script on the selected text. It will apply character styles like, bold, italic, bold italic, subscript, superscript etc. to the selected text. I can then hit the Override button and know that nothing will change.
    The one catch though is to check the Type>Find Font for any fonts that don't have Bold or Italic, for example, I have fonts on my system called MetaPlus Normal, this has only italic in it's subset. I need the other font MetaPlusBold-Normal for bold text.
    But Type>Find Font and change whatever is needed. It's done really quick.

  • [AS CS3] Search first occurence then next search item

    Hi!
    I have a 1000+ page book. I need to change several (2000+) names to character style but only first occurence of that name and then search first occurence of next name. Names are on a text file which i read to AS but if i use
    set myFoundItems to change text
    it searches all occurences of find text and changes to character style.
    What i need is a script that searches first occurence of name "AAA", changes that to character style "Whatever" and then proceeds to search name "BBB" and changes that too. Only first occurences of search.
    It would be wery handy if the second search (BBB) would start right after the "AAA" and not from the beginning of teh story.
    Any ideas?
    Thanks

    On 19/2/08 9:39 PM, "Jukka Lauhalahti" <[email protected]> wrote:<br /><br />> if one could just exit the seach/replace loop after found one item and search<br />> next item in the list from that position would speed the script...<br /><br />It would, but you can't...<br /><br /><br />-- <br />Shane Stanley <[email protected]>

  • The search function and up next option on mini player has dissapeared?

    I don't know what I've clicked, or maybe not touched anything but in the last few weeks the search function and up next playlist has disappeared on the mini player. I'm using OS Mavericks, anyone else having this problem or know what to do? Thanks

    With the exception of the occasional Russian and German questions that appear here... If the manual is written in English, and the questions posted here are predominantly written in English, I'm not convinced that language is therefore the problem.
    I think it kind of works like this... When newbs come here, they:
    1) have no prior experience to realize how often a similar question's been posted
    2a) aren't familiar with the "etiquette" of searching for similar questions befor posting
    2b) aren't familiar the lameness of the search engine on this forum in order to even get answers; or, they've tried it and come up with years' worth of posts to sift through and quickly move to...
    3) ...posting a question because they want a quick fix -- they're probably excited about getting up and running quickly with Logic
    I have always had problems with the readability of the Logic manual, and I still find it difficult to comprehend because it's really poorly written (IMO). Most, sentences in, it read, like, this. And there's a wont of illustrations (pictures are worth...).
    I think some questions are so basic that they don't behoove a response moreso than "spend some time with the manual first". Occasionally I've indulged a total newb (not to single anyone out). It's maybe 75/25 that I felt like I had actually made a difference to their understanding, the poor ratio due to the fact that they simply needed to read the manual first.
    Yes, it's frustrating to see newb posts dominate for a while and push more serious questions to the bottom. The occasional OT post is OK, IMO, but what bugs me more is when they predominate.
    BTW, can anyone recommend some good strings for a 3-string backpack-style dulcimer?
    : ^ )

  • My iphone will no longer connect to my home wifi. it recognises it, but the searching cirlce is constant next to network name. there are three laptops and another iphone on the same wifi that have no issues. i have reset network settings

    my iphone will no longer connect to my home wifi. it recognises it, but the searching cirlce is constant next to network name. there are three laptops and another iphone on the same wifi that have no connectivity issues. i have reset the network settings but that did not help. the issue started last week when the second iphone was introduced to the house, could this be the cause?

    No.
    Any problem connecting your iPhone to any other wi-fi network besides your own?

  • Print Record One next to other

    Hi,
    I am using oracle apex 4.1 and database 10g. My Requirement is to print the records one next to other, Below is the code which i am using to print the records but its getting printed one below other, Please suggest me how to print the records one next to other.
    /* Employee Name and Manager Name */
    for c1 in (
    SELECT
    FIRST_NAME || '' || LAST_NAME EMPLOYEE_NAME,
    MANAGER_NAME(MANAGER_ID) MANAGER_NAME
    FROM HR_EMPLOYEES WHERE ID = :P3_ID
    ) loop
    sys.htp.p('
    <div style="text-align:center;background-color:white;width:180px;height:30px;border:1px solid #000">' || c1.MANAGER_NAME || '</div>');
    end loop;Thanks
    Sudhir

    Sudhir_Meru wrote:
    I am using oracle apex 4.1 and database 10g. My Requirement is to print the records one next to other, Below is the code which i am using to print the records but its getting printed one below other, Please suggest me how to print the records one next to other.
    /* Employee Name and Manager Name */
    for c1 in (
    SELECT
    FIRST_NAME || '' || LAST_NAME EMPLOYEE_NAME,
    MANAGER_NAME(MANAGER_ID) MANAGER_NAME
    FROM HR_EMPLOYEES WHERE ID = :P3_ID
    ) loop
    sys.htp.p('
    <div style="text-align:center;background-color:white;width:180px;height:30px;border:1px solid #000">' || c1.MANAGER_NAME || '</div>');
    end loop;
    Why are you doing this in PL/SQL instead of a report?
    Why is it required "to print the records one next to other"?
    (You've been repeatedly asked to post code using <tt>\...\</tt> tags. Note how not doing so results in incomplete presentation of information. Why are you unable to provide this basic courtesy to other forum users?)

  • Adobe reader  X and XI search don´t find text like other programs including adobe reader 9? Thanks

    Adobe reader  X and XI search don´t find text like other programs including adobe reader 9? Thanks

    You mean, you are trying to search text in a PDF file, and you can do it in Reader 9 but not in later versions of Reader (using the same file)?

  • Using SEARCH HELP exit in dependency of other parameters from my dynpro.

    Hello experts,
    how can I access the values of input fields (parameters or select-options) from my dynpro?
    I need to build a F4-help in dependencie of another field on the screen with help of the F4 - exit. I think this should be possible.
    If I do test the search help with SE11 it works fine. All parameters from screen are given in SHLP_TAB[1]-INTERFACE (the parameter of my f4-help-exit)
    The short example explains the problem more detailed.
    REPORT  test_dynpro_events_ck.
    PARAMETERS ea1 TYPE my_char_10_ck DEFAULT 'here I push F4' MATCHCODE OBJECT MY_F4_HELP_CK.
    PARAMETERS ea2 TYPE my_char_10_ck DEFAULT 'this is the value I need to generate the F4 help of field ea1'.
    MY_F4_HELP_CK:
    import: EA1 and EA2
    export EA1
    Many Thanks
    Christian

    Thank you so far.
    But how are these parameters passed to the search help without using global set/get parameters or DYNPRO_READ_VALUE? Why can I put these parameters to my search help as input parameters ... seems to be useless if I use search help on Selection-Dynpros?
    Is there not a better way to deal with search-helps which are dependent from other input fields? Btw. I need the value without passing PAI and PBO.
    In my Example:
    doing some text inputs in field EA2 -> hit search help on EA1 -> need a selection dialog in dependency of the input in EA2. This can not be that complicated?
    Many thanks
    Christian

  • After i reset my phone to delete my search history can i restore my other contents to my phone

    After i reset my phone to delete my search history can i restore my other contents to my phone

    What do you mean by "reset"?
    What "search history" you want to delete?

  • I have some issue with my bluetooth im using an iphone 5 its just keep on searching bluetooth devices it cannot detect other bluetooth device, any solutions to my problem?

    I have some issue with my bluetooth im using an iphone 5 its just keep on searching bluetooth devices it cannot detect other bluetooth device, any solutions to my problem?

    Hi miffyzoo,
    If you are having bluetooth pairing issues with your iPhone and your Mac, you may find the troubleshooting steps outlined in the following article helpful:
    iOS: Troubleshooting Bluetooth connections
    http://support.apple.com/kb/TS4562
    Regards,
    - Brenden

  • Script to apply cell style after search for paragraph

    Hello,
    can somebody help my do a script to search for all occurences of a paragraph format in tables and then apply a cell style to the enclosing cell for a document.
    Thanks in advance.
    Peter
    BTW Mac InDesign CS 6

    Hi,
    use this:
    var mDoc = app.activeDocument,
    pST = mDoc.paragraphStyles.item("paraStyleName"),
    cST = mDoc.cellStyles.item("cellStyleName"),
    mFound, mParent, count;
    app.findTextPreferences = null;
    app.findTextPreferences.appliedParagraphStyle = pST;
    mFound = mDoc.findText();
    count = mFound.length;
    while (count--) {
         mParent = mFound[count].parent;
         if (mParent.constructor.name == "Cell")
              mParent.appliedCellStyle = cST;
    app.findTextPreferences = null;
    edit paraStyleName and cellStyleName
    Jarek

  • Grep Removing Characters when searching for Paragraph returns

    I'm currently working on an xml based business card file and the formatting requires me to search for a phone number followed by a End of Paragraph followed by a Page Break and then remove the unnecessary Paragraph Return. For some reason inDesign will not find an End of Paragraph then a Page Break through the following grep code "\r~P", however if I search for "\r\r" it will find it. I have been able to get this to work with "(\d{3}\.\d{3}.\d{4})\r\r" and then change to "$1~P", but each subsequent business card loses one number off of the end (804.777.7777, 804.777.777, 804.777.77 etc). What would cause this?
    Thank you,
    Brandon Boswell

    You should move this over to scripting (http://forums.adobe.com/community/indesign/indesign_scripting). You'll find people over there who can give you more help, if there is any.

  • How can I get iOS "Contacts" to sort search results on a name-first, other-fields-next basis?

    Example: I type "jo sm" into the search bar in Contacts on iOS 7, expecting John Smith and Josephine Smolens to appear at the top of the list, as they are the only ones of my contacts whose name matches the pattern "jo* sm*".  Instead, they are perhaps numbers 15 and 34 on the list, as other peoples' Notes fields also contain the pattern "jo* sm*".
    Thanks in advance for any help you can give!

    This does not answer my question.  I apologize for my lack of clarity when I tried to explain the problem. 
    To clarify: I'm not using wild card characters; I was just trying to explain the behavior I get and how it's different from what I want.  Let me try again a slightly different way:
    When I type "jo sm" into the Search bar in iOS 7 Contacts, I want the first results to be the people whose First Name starts with (or even just contains) "jo" and whose Last Name starts with (or contains) "sm".
    Instead, I get all contacts whose Notes contain the letters "jo" and "sm" anywhere at all (which is many many people), and they are given to me in an order that seems random.  Therefore, when I type "jo sm", I don't see the contact I'm looking for because he/she is routinely three pages down the list.
    Thanks in advance!

  • Unable to search for font style Italic

    In InDesign's Find/Change dialog, I click on the Find Format magnifying glass to open the Find Format Settings dialog. I click on the Basic Character Formats tab, and in the Font Style field I select 'Italic' from the dropdown menu. When I release the mouse button, the field displays 'Regular', not 'Italic'. If I key the word 'Italic' in the field, the same thing happens. The only way I've been able to get around this is to specify the Font Family as well, but I want to search for Italic Font Style regardless of the Font Family (there are several in the document). I haven't specified any other search details in either the Find/Change dialog or the Find Format Settings dialog. I'm currently using CS5.5 but I've experienced this problem dozens of times in both CS4 and CS5.5. I have a vague recollection of occasionally being able to do it, but if so it's been very rare.
    Is there a reason why this is happening? Is there any way to search for Italic Font Style regardless of Font Family?

    I'm on Mac OS 10.6.8.
    Thanks for the script, it worked fine, but on top of that it inadvertently revealed what is going on with this issue.
    When I ran the script, the Find Format field in the Find/Change dialog showed '+Italic'. However, when I went into the Find Format Settings dialog, the Font Style field said 'Regular'. When I exited the Find Format Settings dialog, the Find Format field still said '+Italic'. The Find process worked fine, that is, it found text formatted as Italic.
    I then went back to what I was originally doing, without using the script, and exactly the same thing happened. The two fields didn't match up, but the Find operation worked fine.
    I'm currently working in CS5.5, but as I recently purchased CS6, I tried it in that program and exactly the same thing happened. And just to confirm my recollection, I tried it in CS4 and it happened there too.
    I realise also why it has occasionally worked OK. Sometimes I would have entered Italic in the Font Style field and immediately clicked OK to exit the Find Format Settings dialog, and I wouldn't have noticed anything wrong. But once I got used to the problem, I started to make a habit of tabbing out of the Font Style field 'just to make sure'. I would have seen it revert to Regular, and I would have just given up and (unnecessarily) worked my way through the font families one by one.
    Anyway, now that I know what's going on, it's not a problem at all, but it's odd that it's persisted through at least three versions of InDesign. Thanks, Jongware, for your help.
    Does this happen on Windows? Has anyone else on a Mac experienced this strange behaviour?

  • Google is NOT WORKING with Firefox 3.6.8, you can type in & Search but clicking on next is a dead link; does nothing?

    Google is NOT working on Firefox 3.6.8, suddenly today. You can type in search and get results on initial page. Clicking on 'next' link or any number links is dead. Yahoo & Bing seem to work. I do not have a Google toolbar. Very frustrating. This suddenly happened today. Please check into it.

    Start Firefox in [[Safe Mode]] to check if one of your add-ons is causing your problem (switch to the DEFAULT theme: Tools > Add-ons > Themes).
    See [[Troubleshooting extensions and themes]] and [[Troubleshooting plugins]]
    Your above posted system details show outdated plugin(s) with known security and stability risks.
    *Shockwave Flash 10.0 r22
    Update the [[Managing the Flash plugin|Flash]] plugin to the latest version.
    *http://www.adobe.com/software/flash/about/

Maybe you are looking for