Locate and replace the error style para

Hi experts,

How can I make this script correct?

    app.findGrepPreferences = app.changeGrepPreferences = null;
    app.findGrepPreferences.findWhat = "^\\s$";
    app.findGrepPreferences.appliedParagraphStyle = "Line_0.5";
    app.changeGrepPreferences.appliedParagraphStyle = "Line_0.5 Color";
    app.selection[0].changeGrep();
    app.findGrepPreferences = app.changeGrepPreferences = null;   

Thank you

Respect of

John

Hi Johnwhite,

I changed the above code. In the snapshot shown the definition contains with a ParagrphStyleGroup.

app.findGrepPreferences = app.changeGrepPreferences = null;
app.findGrepPreferences.findWhat = "^\\s$";
app.findGrepPreferences.appliedParagraphStyle = app.activeDocument.paragraphStyleGroups.item("Table Line").paragraphStyles.item("Line_0.5");
app.changeGrepPreferences.appliedParagraphStyle = app.activeDocument.paragraphStyleGroups.item("Table Line").paragraphStyles.item("Line_0.5 Color");
app.changeGrep();
app.findGrepPreferences = app.changeGrepPreferences = null;

THX,

csm_phil

Tags: InDesign

Similar Questions

  • Locate and replace the breakers InDesign file

    I'm working on a file and whenever I do a search and replace, it crashes. I ran recently Adobe updater and when I did, the application gave an error that "Scotch rules" have been used on the last saved version and it has not been loaded on my system. As I built this file on my system, I knew I had rules of Scotch. I went in my extensions Manager and helped him. This did not help the fracas. It crashes with this load and it has not loaded.

    I also trashed my preferences in InDesign using the cmd + opt + Ctrl-Shift, as well as by the hand towards records. Nothing works

    Any ideas?

    Thanks in advance!

    Peter Spier It turns out that the screen resolution is the issue. A friend mentioned that Illustrator has problems with greater than a certain number of screen resolutions. I had recently changed my screen resolution and forgotten. So, Yes, it is preferable to keep the resolution of the screen down in order to keep the Adobe products to act weird. Mine is of the order of 1400 now.

    Thanks for your suggestions.

  • Locate and replace the last paragraph style

    With .js or grep, I want to change the style of the last paragraph ball against one with more space after, there are a lot of them in one story mixed with other styles.

    Change this:

    • B. blarrblarr (bullet style)
    • B. b. b. b. (bullet style)
    • B. b. change it (bullet style)

    To do this:

    • B. blarrblarr (bullet style)
    • B. b. b. b. (bullet style)
    • B. b. change this (last bullet style)

    Is this possible? If anyone can help would be great!

    Thank you very much!

    I think that this JavaScript does the job. You may need to change the style names to match yours. In addition, it assumes that the styles are not grouped in a folder.

    //DESCRIPTION: Fix last bullet paragraphs
    
    (function() {
         if (app.documents.length > 0) {
              findFixLastBullets(app.documents[0]);
         }
         function findFixLastBullets(aDoc) {
              setupFindText();
              app.findTextPreferences.appliedParagraphStyle =  "Bullet";
              var myFinds = aDoc.findText();
              for (var j = myFinds.length - 1; j >= 0; j--) {
                  var lastPara = myFinds[j].paragraphs[-1];
                  // if next para already BulletLast do nothing
                  var nextPara = lastPara.insertionPoints[-1].paragraphs[0];
                  if (nextPara.appliedParagraphStyle.name == "BulletLast") continue;
                  lastPara.appliedParagraphStyle = "BulletLast";
              }
         }
         function setupFindText(find, change, wholeWd, caseSense, foots, hidLayers, lockedLayers, lockedStories, masters) {
         app.findTextPreferences = null;
         app.changeTextPreferences = null;
         try { app.findTextPreferences.findWhat = find } catch(e) {};
         try {app.changeTextPreferences.changeTo = change } catch(e) {};
         app.findChangeTextOptions.properties = {
              caseSensitive:(caseSense == null ? false : caseSense),
              wholeWord:(wholeWd == null ? false : wholeWd),
              includeFootnotes:(foots == null ? false : foots),
              includeHiddenLayers:(hidLayers == null ? false : hidLayers),
              includeLockedLayersForFind:(lockedLayers == null ? false : lockedLayers),
              includeLockedStoriesForFind:(lockedStories == null ? false : lockedStories),
              includeMasterPages:(masters == null ? false : masters)
         }
    } // end setupFindText
    
    }())
    

    Note the small touch that if the next paragraph is already BulletLast, it ignores who found the text. This allows you to run the script more than once if you add more text.

    Dave

  • Is there a program to locate and replace the missing files in Win XP Pro 64 and the dll?

    I am running Win XP Pro 64 SP 2, on xfx 680i LT MoBo, Intel Duo Core 3 GHz. My computer is seen adapts to any time and stutters a lot, and sometimes I confuse it so it sits and wonders every day. When I see autorun (Sys Internals) I find several file not found entries. The same thing happens with Malware Bytes and HiJack This. Is there a program that will search for files or corrupt links and repair; missing it works? Thank you all. Merry Christmas.

    Thank you all for your responses pending. I want to especially thank Jose Ibara for in-depth answers. He is now coming along and no new response is necessary (I hope, or this thing dies!). Once again thank you.

  • Error - "Launcher requires the write permission for World of Warcraft key to locate and launch the game successfully. Please turn on write access to the registry key with the help of an administrator account"

    Original title - edit registry of the world of Warcraft Launcher to write

    I downloaded the patch more recent game in my computer, I did a cleanup of the system and tried to log in again, but now the States window it "(Launcher requires permission in writing for World of Warcraft key to locate and launch the game successfully." Please allow write access to the registry key by using an administrator account)", how can I access the registry to resolve this problem? Help please

    Hello DaTurtle !

    I had exactly the same problem, I have not found the sollution here...

    But I found how to fix very easy !

    You do a right click on the WOW icon at the office-
    then browse to the location of the file -
    It will appear a lot of files-
    Click on the WoW program file instead of the pitcher-
    will start your wow game-
    Log in as normal-
    then he will come to the top to update...

    After the update your wow will work as usual!

    It worked on my computer, please respond!

    Hans_Craft

  • Need to install KB947821 update but fails and displays the error 9370001 code

    You will need to install KB947821 update but fails and displays the error code 9370001.  Does anyone have a solution?

    CrystalBall © SEZ...

    Free unlimited installation and compatibility support is available for Windows Vista, but only for Service Pack 2 (SP2). This support, initially planned to end on November 26, 2009, has been extended until February 26, 2010. Availability of support chat or messaging differs depending on your location. Some questions may require that more support for which he is advanced a charge.  Go to http://support.microsoft.com/oas/default.aspx?prid=13014&gprid=582034 & select appropriate category (i.e., download problem;) Installation problem; Problems after installing a service pack).

    ~ Robear Dyer (PA Bear) ~ MS MVP (that is to say, mail, security, Windows & Update Services) since 2002 ~ WARNING: MS MVPs represent or work for Microsoft

  • Selection of parts and columns, or entire lines and apply the character style

    I am trying to apply character styles to certain parts/whole rows and columns.

    I can change individual cells with the following code...

    table = app.selection[0];
    if (table.hasOwnProperty("baseline")) table = table.parent;
    if (table instanceof Cell) table = table.parent;
    if (table instanceof Column) table = table.parent;
    if (table instanceof Row) table = table.parent;
    if (table instanceof Table)
    
    {
     table.rows[0].cells[6].texts[0].appliedCharacterStyle = "none report";
     }
    

    ... but when I try to select an entire line, I get the error 'Object does not support property or method' texts. "" "When I try one of the following two codes.

    {
     table.rows[0].cells.texts.appliedCharacterStyle = "none report";
     }
    

    {
     table.rows[0].cells.appliedCharacterStyle = "none report";
     }
    

    Anyone know how I can do the following?

    1. Select any row (or column) and apply the character style

    2. Select the last line (regardless of the number of rows in the table) and apply the character style

    3. apply the character style to specific columns (with theexception of the cells of two albums)

    Thank you!

    Hello

    Change this line:

    table.columns[a].cells.itemByRange(2,-1).texts.everyItem().appliedCharacterStyle = "chart orange";
    

    for the first 2 rows in each column

    Jarek

  • I have different bookmarks I want to keep on each computer, synchronization will delete the bookmarks on a single computer and replace the bookmarks from another computer in their place

    I have not yet used sync, but I sense it's going to be a problem if I do. I have different bookmarks I want to keep it on each computer. Sync will delete the bookmarks on a single computer and replace the bookmarks from another computer in their place? So I think that will erase the bookmarks on the second computer you configured to synchronize. Is there a way to merge bookmarks on every computer in the library of a bookmark that contains all bookmarks on both computers, so I'm not all bookmarks in sync?

    Just to be clear, this is something that we have commented several times in the forum, Firefox Sync adds everything that is already in the device for the account and pushes this info for the rest of the devices.

    So if you have 2 computers with data X and the other with the data from there, once you set up synchronization in both computers you will have X + Y at the same time.

    I hope that clarifies the doubts...

  • Satellite A30 921: how to remove and replace the memory?

    Hi, can someone help me how to remove and replace the memory of satellite A30 921. and also, please give a detailed instruction.

    Thank you in advance.

    Hello

    There is not much to explain. On the low side in the Middle it is placed to cover memory (fixed with two screws). Remove the cover and you will see 2 slots there. I put t know how much memory you here but like Stefan says you can use max 2 GB of RAM (2 x 1024Mo PC2700 - PA3313U-1M1G). How to remove the memory modules, which you can see on http://www.hardwaresecrets.com/article/189/5

    Good bye

  • Laptop HP Touchsmart 15-D020: how to remove and replace the keyboard on laptop HP Touchsmart 15-D020NR

    I spilt a drink on my keyboard and now I can not turn off the caps lock and a number of keys does not work. I need instructions on how to remove and replace the keyboard frame. Thank you.

    On your page of support-look for Maintenance and Service of Guide in the manuals.

    http://support.HP.com/us-en/product/HP-15-D000-TouchSmart-notebook-PC-series/6627588/model/6761859/manuals

  • Search and replace the string formatting

    Hello

    I try to do a search and replace the formatting of a string.

    In the example, I'm looking for the string 'SUCCESSFUL', but it must also begin by usbflash and some number + PASSED.

    I can't get the format to have a number between 1 and 99. The number of replacements should add up to 6 in this case. I tried with \d for any number, and I also tried [1-99].

    Make a right-click on the function search and replace the string.  There is an option to use regular Expressions.  Then give it a try.

    EDIT: You need to set the entry replace all to TRUE.

  • try to install update KB981715 and receive the error code 80070663

    tried to install the update and get the error code all the time.  How to install this update

    lindeelou,

    Please post with the information requested here: what to post in the Windows Update forum
    Start with these troubleshooting steps and post returns with the requested info and arises from the troubleshooting.

    Clean boot your PC, and then run Windows Update.

    Reset the Windows Update components

    Perform operations of KB883825

    Mike - Engineer Support Microsoft Answers
    Visit our Microsoft answers feedback Forum and let us know what you think.

  • PC crashed and get the error message: 0 x 80244019 XP

    Just formatted my pc after it crashed and now I can't update and receive the error message. 0 x 80244019. thank you

    Please check the thread below for a possible solution: data- tricky300 - a regular contributor here:

    http://answers.Microsoft.com/en-us/Windows/Forum/windows_xp-windows_update/Windows-Update-problem-error-number-0x80240036/5c2fdc0a-3da6-4C3B-9697-a88be681e7c1>

    This is the full installer you need, ignore the warnings about it being for COMPUTER technicians.

    The current time and the date now in Eritrea is

    19:36

    Wednesday, March 27, 2013
    Standard time + 0300 UTC

    UTC/GMT is 16:36 on Wednesday, March 27, 2013

    Current weather conditions in Asmara

    Partly cloudy31 ° C / 88 ° F
  • Windows XP trying to update and get the error: another installtion progresses.

    original title: Windows XP, try to update and get the error: another installtion progresses.   That all before you proceed with this installation. How can I know what is the installation and the status?

    Windows XP trying to update and get the error: "another installtion progresses.   That completes before proceeding with this installation. "How can I know what is the installation and the status?

    Hello

    1. are you referring to Windows update?
    2 have you made changes on the computer before this problem?

    Please answer these questions and to provide more specific information on the issue. This could help us help you better.

    You can check the question in the clean boot state.

    From your computer by using a minimal set of drivers and startup programs so that you can determine if a background program is interfering with your game or program. This type of boot is known as a "clean boot".

    Reference:
    How to configure Windows XP to start in a "clean boot" State
    http://support.Microsoft.com/kb/310353

    When you are finished troubleshooting, follow these steps to reset the computer to start as usual:
    a. click Startand then click run.
    b. type msconfigand click OK.

    The System Configuration Utility dialog box appears.

    c. click on the general tab, click Normal Startup - load all device drivers and services and then click OK.
    d. When you are prompted, click on restart to restart the computer.

  • How can I download and replace the fonts directory in the folder Windows for Vista

    Separated from this thread.

    How can I download and replace the fonts directory in the folder Windows for Vista?

    I think I have a corrupted font file, but I don't know which.

    Thank you

    George Criffield

    Oh sorry, you will need to obtain from another computer Windows Vista or your install disc (if you have one, these instructions are here).  I have just the zip and give you a complete file of fonts, but it's against the license (and technically to the United States law) for them to be distributed.

Maybe you are looking for