[JS CS3] Find/Change "[Basic Paragraph]" style

I'm trying to find all occurances of the [Basic Paragraph] style and replace them with [No Paragraph Style]. I'm using:
app.findTextPreferences.appliedParagraphStyle = "[Basic Paragraph Style]";
app.changeTextPreferences.appliedParagraphStyle = "[No Paragraph Style]";
I get the message "Invalid value for set property 'appliedParagraphStyle'. Expected String, ParagraphStyle or NothingEnum enumerator, but received "[Basic Paragraph Style]"."
I've tried every combination of brackets, no brackets, quotes, no quotes, etc. It doesn't seem like this can be scripted, even though it can be done via find/change in InDesign. Am I banging my head against the wall? Does anyone know if this can be done?

"[Basic Paragraph]" as shown in the code below doesn't work either. (the word "Style" actually snuck in as I was trying different variations. But no combination seems to work.
If anyone knows that [Basic Paragraph] can or cannot be accessed via scripting, I'd like to know. Thanks.
app.findTextPreferences.appliedParagraphStyle = "[Basic Paragraph]";
app.changeTextPreferences.appliedParagraphStyle = "[No Paragraph Style]";

Similar Messages

  • CS3 Find Font/Delete Paragraph Style/Redefine Paragraph Style Causes Crash

    I am running into a very frustrating issue where I cannot replace a paragraph style. The issue is that we used to use some adobe type fonts and want to move to the true type equivalent so that we don't have problems working on files between mac and pc. The problem occurs on both mac and pc on a variety of hardware (both c86 and ppc macs for example). When we open the document it identifies that the font cannot be found (example Palatino T1). When we click find font and select the regular ttf Palatino replacement and click Change All Indesign just vanishes and leaves a crash message with a ton of garbage and a read only memory error. The same happens if we change the font on some text and right click on aragraph style and click "redefine style" - there is a sudden crash.
    Trying to work around this I went into our templates and tried to change it there. Opening the paragraph style and selecting the new font caused it to crash upon selecting OK. Also trying to Make a new paragraph style works, but then when deleting the old one causes a crash no matter what combination of mapping or not mapping the old paragraph style we chose (we tried every option under the dialogue and selected several different styles to map to or none at all).
    This occurs on several different fonts and on several different templates. I have tried deleting the adobe font cache to no avail. Any help resolving this would be great - all our employees are going nuts over this problem.
    Thanks in advance for any help or suggestions!

    Peter, your latest post led me to an interesting revelation. When I change Palatino (t1) bold to Palatino Bold using Find/Change it is fine. When I change Palatino (t1) to any font using Find/Change there is a curious result! As soon as I click find first the page changes to the default template and all content is hidden. The 4 or 5 places where palatino occurs on the default template change fine, but then on the next click of FIND FIRST it crashes! So the problem is connected to "find first", not the actual change. My guess is this is an issue of with how the find/change jumps from the template to the individual page, but I'm not sure exactly what is happening.

  • FIND/CHANGE - Applying Paragraph Style

    Hello,
    I used FIND/CHANGE to apply my paragraph style and when I apply the paragraph style... it applies the style to the entire line.
    For example,
    A. #70712       resulted to         A. #70712
    I only wanted the "#70712" to be changed to my style. I used the GREP search and entered #.+ and then I choose the paragraph style I want and clicked change all. The problem is that it changed all the text on that line and applied the paragraph style.
    Please help. Thank you very much.

    graphicsoc wrote:
    Hello,
    I used FIND/CHANGE to apply my paragraph style and when I apply the paragraph style... it applies the style to the entire line.
    For example,
    A. #70712       resulted to         A. #70712
    I only wanted the "#70712" to be changed to my style. I used the GREP search and entered #.+ and then I choose the paragraph style I want and clicked change all. The problem is that it changed all the text on that line and applied the paragraph style.
    Please help. Thank you very much.
    If I understand your request correctly:
    If your paragraph style uses a numbered list to create the "A." and the remainder of the paragraph consists of only "# 70712" that you type in manually (or place from an existing file), I believe that you you don't need GREP. You can format the auto-numbered list differently from the remainder of its paragraph, by specifying a character style for the number portion.
    To extract only the non-numbered portion of an auto-numbered paragraph, for a TOC, in the Table of Contents dialog box, open the bottom part by clicking More Options if necessary, and in the Numbered Paragraphs pull-down menu, select Exclude Numbers.
    Read more about Table of Contents in Help, and/or with a Google search for terms like "InDesign table of contents numbered list exclude numbers" without quotes.
    If you need additional special formatting "tricks" in the source paragraphs, or in the TOC entry paragraphs, look into Nested Styles and GREP
    Styles in Help or Google searches.
    HTH
    Regards,
    Peter
    Peter Gold
    KnowHow ProServices

  • [Basic Paragraph] style name change to NormalParagraphStyle?

    i m trying to edit existing paragraph style. i was do it through kEditTextStyleCmdBoss. My problem is : As the command is process the name of [Basic Paragraph] style is changed to NormalParagraphStyle and it is now editable. How i can make its name field again not changable(i.e. preserve its original property)?
    Regards
    Kannu

    Hi,
    Have you some solution?
    Best regards:
    Karoly

  • Script to duplicate Basic Paragraph style, then change character point size

    I'm looking to create a script that will create a cascade of paragraph styles based on the [Basic Paragraph] style settings. My goal is for each new paragraph style's character point size to be a percentage of the original [Basic Paragraph]'s. So if [Basic Paragraph] is 100% (character point size 10pt), the script would create a paragraph style named '120%' that has a character point size of 12pt. Then 133%, 140%, so on and on. I modified a script found on this forum to generate those new styles, but I don't know how to create them to be basedOn the [Basic Paragraph]. Any help would be very much appreciated, thanks in advance.
    current script:
    var doc = app.activeDocument,  
        pstyle = ["100%", "120%", "133%" ];  
    for(var i =0;i<pstyle.length;i++)  
            if(pstyle[i] == "100%") 
                doc.paragraphStyles.add({name:pstyle[i], appliedFont:"Stag", pointSize:10});              
            else if(pstyle[i] == "120%") 
                doc.paragraphStyles.add({name:pstyle[i], appliedFont:"Stag", pointSize:10*1.2})              
            else if(pstyle[i] == "133%") 
                doc.paragraphStyles.add({name:pstyle[i], appliedFont:"Stag", pointSize:10*1.33333})              

    Try this,
    var doc = app.activeDocument, 
        pstyle = ["100%", "120%", "133%" ]; 
    for(var i =0;i<pstyle.length;i++) 
            if(pstyle[i] == "100%")
                doc.paragraphStyles.add({name:pstyle[i], basedOn: doc.paragraphStyles[1], appliedFont:"Minion Pro", pointSize:10});             
            else if(pstyle[i] == "120%")
                doc.paragraphStyles.add({name:pstyle[i], basedOn: doc.paragraphStyles[1], appliedFont:"Minion Pro", pointSize:10*12})             
            else if(pstyle[i] == "133%")
                doc.paragraphStyles.add({name:pstyle[i], basedOn: doc.paragraphStyles[1], appliedFont:"Minion Pro", pointSize:10*1.33333})             
    Vandy

  • Why can't I define bullet paragraph in Basic Paragraph style?

    I would like to set up my Basic Paragraph style so that I can quickly apply bullets to individual paragraphs - using MY preferred indents - without having to create a new style for the bullet paragraphs. I tried changing the settings of the Basic Paragraph style, with no documents open, but it doesn't seem to want to accept my choice of indents. First I selected bullets and set an indent, but then the whole paragraph defaults to bullets. When I switch the bullet setting back to "none" the only thing that it keeps is the last setting I chose for tabs. (Which simultaneously changes the default tab setting for all paragraphs.) But when I create a new doct and start a bullet paragraph, the indents always default to .25/-.25, and any tab setting LESS than .25 results in the first line indenting to the tab setting, but the rest of the paragraph indenting to .25. There seems to be no way to change the default indent for bullets without creating a new paragraph style. And usually I'm fine with that. But I thought I would like to have a quick default using the Basic Paragraph style. Am I missing something or is this just not possible?
    Here is a visual/verbal screenshot to help explain:

    Let's see if I understand this differently from the others. You want to apply bullets manually from time to time without having to select a new style, you want to do this by pressing the bulleted list button in the Control panel, and you want settings for tabs and indents other than the default. Is that correct?
    As far as I can tell there is no way currently to do this. You cannot set up the parameters for bullets unless the text cursor is active or you are defining a style, so there is no way to set up new defaults. You don't want to set up parameteres everytime you need a bullet, so, either you type the bullets manually, tab and insert an indent to here character, which is actually a lot more work, or you go ahead and set up the style. You can access the style list in the dropdown on the Control panel, or you can add a keyboard shortcut to give you quick access, or hit Ctrl (Cmd on Mac) + Enter to access Quick apply and start typing the name of the style (almost as fast as a keyboard shortcut).

  • [Basic Paragraph] style behaviour upon copy/paste

    Hi,
    we just get started changing from Quark to InDesign, and our lead layout-producer is not so crazy about style sheets, so everything she creates is using the [Basic Paragraph] Style.
    A by her created libary now contains groups of text objects in Basic Paragraph with format changes +
    When I use these groups, or copy and paste from another document, why does InDesign keep the changes like fontsize or -color, but does change the font?
    My basic paragraph does use another font, so its quite annoying INDD keep the changes, but keep change the font.
    What can I do to prevent INDD from changing the font?

    So, i made this beauuutiful thingy for a test. It looks disgusting, i know. The point is that it uses 4 fonts and different modifications.
    If I get you right, to prepare a "good" document, our layout-producer should clogg our documents with different paragraph-styles not to use the Basic? Sure, she can convert it into paths, but different collegues have to translate this stuff later so that isnt an option.
    Maybe she can "design" things like that in Illu, giving us an AI to use.
    I made an irritating discovery:
    As I built this thing with Futura as my Basicparagraph-font, i dragged it into a libary, closed every doc to change my default-paragraph-style to another font to see what happens. I set up a empty doc and dragged it back in again – no changes at all. I was surprised. Its in the basic, it has a +, and if i click on basic it changes to GillSans, if i alt+click the modifications (like the colors) turn to black… – this is what i was looking for :-)
    But why with my other test-object. Im nearly in closing time here, so i will upload an image tomorrow, but the only variable that haved changed to my second try minutes ago:
    – the objects were converted using Q2ID (Markzware)
    – the group just contained one (but another) font
    Maybe theres the problem somewhere.

  • 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?

  • [AS] How to change a paragraph style within any folder in Find Grep?

    I want to change both text and paragraph style
    I do that job very easily until I put paragraph styles in a folder
    How to express the paragraph style "passage" within the folder "1st" in AppleScript?
    In line 18 below, "1st:passage" may be wrong... so I've tried and search for an hour, but I can't get the answer..
    sorry for bad english
    my main()
    on main()
      mySnippet_test()
      myTeardown()
    end main
    on mySnippet_test()
              tell application "Adobe InDesign CS5.5"
                        set myDocument to document 1
                        set find grep preferences to nothing
                        set change grep preferences to nothing
                        set include footnotes of find change grep options to false
                        set include hidden layers of find change grep options to false
                        set include locked layers for find of find change grep options to false
                        set include locked stories for find of find change grep options to false
                        set include master pages of find change grep options to false
                        set find what of find grep preferences to "\\n"
                        set change to of change grep preferences to "\\r"
                        set applied paragraph style of change grep preferences to "1st:passage"
                        tell myDocument
      change grep
                        end tell
      --Clear the find/change preferences after the search.
                        set find grep preferences to nothing
                        set change grep preferences to nothing
              end tell
    end mySnippet_test
    on myTeardown()
    end myTeardown

    Replace the red line with… Replacing name strings to yours…
    set myStyle to paragraph style "Style A" of paragraph style group "Style Group 1" of myDocument
    set applied paragraph style of change grep preferences to myStyle

  • Find and change last paragraph style

    With .js or grep, I want to change the style of the last bullet paragraph to one with more space after, there are many of them in one story mixed with other styles.
    Change this:
    blarr blarrblarr (bullet style)
    blarr blarr blarr blarr (bullet style)
    blarr blarr change this one (bullet style)
    To this:
    blarr blarrblarr (bullet style)
    blarr blarr blarr blarr (bullet style)
    blarr blarr change this one (last bullet style)
    Can this be done? If anyone can help, it would be great!
    Many thanks!

    I reckon this JavaScript does the job. You might have to change the style names to match yours. Also, it assumes that the styles aren't 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
    Notice the little touch that if the next paragraph is already BulletLast it ignores that found text. This allows you to run the script more than once if you add more text.
    Dave

  • [AS] CS3- Find any text with style, then replace that text with a new applied fill color.

    I am trying to find the simplest way in cs3 to find any text with style, then replace that text with a new fill color. I can find text and change text. I can find a style and change it to a new style. I can't seem to find a style and change the applied fill color. I do not want to change the properties of the style, just the applied color. Yes, I want the + sign, for now. I know, why not update the style, I am not allowed to. Any help would be great. Since the search is not available, I need a new response.
    Thanks.

    You can work around the bug by just doing a find, then looping through the<br />results, changing the color one at a time. It'll be a fraction slower, but<br />should do the trick:<br /><br />tell application "Adobe InDesign CS3"<br />    set find text preferences to nothing<br />    set properties of find text preferences to {applied paragraph style:"The<br />name"}<br />    set theFinds to find text document 1<br />    repeat with i from 1 to count of theFinds<br />        set properties of item i of theFinds to {fill color:"Replace color"}<br />    end repeat<br />end tell<br /><br />The bug is fixed in CS4, BTW.<br /><br />-- <br />Shane Stanley <[email protected]><br />AppleScript Pro Florida, April 2009 <a href=http://scriptingmatters.com/aspro>

  • PAGES: How change a Paragraph Style ?

    Hello all,
    there is something that is driving me crazy...
    using Pages for iPad is it possible to change the default settings of a Paragraph Style ?
    I am not talking about importing a document with a custom set of styles but simply:
    - I open my document in Pages for iPad
    - I select a line of text and apply the "Header 1" style to it
    - I am not happy - for example - with the font size of the Header 1 style and I want to make all my Header 1 paragraphs change their font size
    - In the desktop version you would simply change/update the style you need, but on the iPad I cant find a way to change those values
    (BTW, I seem to remember that I once managed to do this...)
    Thanks,

    You seem to be able to copy and paste styles, but nowhere that I can find does it let you update the defined styles.
    There is the manual which does not refer to any suitable method, and also some eBooks on the subject but I have scanned those and can find no reference to redefining styles either.
    The more I play with Pages for iPad the more of a toy it seems. Sort of amazing that it does what it does on a mobile tablet, but when you get right down to it, not very useful.
    Peter

  • [AS] CS3 Find -Change inserting soft return instead of hard

    Can anyone help identify why this script doesn't work? i want it to replace multiple returns with a single paragraph return. It's replacing with a soft return rather than a hard return.
    I copied and pasted the find grep and change grep fields into the script. I even tried it by typing "\r" into the change grep field. Any thoughts? Much appreciated!
    tell application "Adobe InDesign CS3"
    --Clear the find/change preferences.
    set find grep preferences to nothing
    set change grep preferences to nothing
    set find text preferences to nothing
    set change text preferences to nothing
    --Set the find options.
    set include footnotes of find change grep options to false
    set include hidden layers of find change grep options to false
    set include locked layers for find of find change grep options to false
    set include locked stories for find of find change grep options to false
    set include master pages of find change grep options to false
    --delete multiple graphs
    set find what of find grep preferences to "~b~b+"
    set change to of change grep preferences to "
    set myStory to parent story of item 1 of selection
    tell myStory
    set myFoundItems1 to change grep
    end tell
    set find grep preferences to nothing
    set change grep preferences to nothing
    end tell

    Shane, thanks! This worked. What I meant to have written was that when copying "~b" from the find/change field in InDesign and pasting into Script Editor, and saving, it converted it automatically to a hard return. I didn't try it manually because sometimes the obvious is elusive! (to me at least)
    Thanks again.
    Jim

  • Pages for iPad: change a Paragraph Style ?

    Hello all,
    there is something that is driving me crazy...
    using Pages for iPad is it possible to change the default settings of a Paragraph Style ?
    I am not talking about importing a document with a custom set of styles but simply:
    - I open my document in Pages for iPad
    - I select a line of text and apply the "Header 1" style to it
    - I am not happy - for example - with the font size of the Header 1 style and I want to make all my Header 1 paragraphs change their font size
    - In the desktop version you would simply change/update the style you need, but on the iPad I cant find a way to change those values
    (BTW, I seem to remember that I once managed to do this...)
    Thanks,

    You seem to be able to copy and paste styles, but nowhere that I can find does it let you update the defined styles.
    There is the manual which does not refer to any suitable method, and also some eBooks on the subject but I have scanned those and can find no reference to redefining styles either.
    The more I play with Pages for iPad the more of a toy it seems. Sort of amazing that it does what it does on a mobile tablet, but when you get right down to it, not very useful.
    Peter

  • Find and replace paragraph style

    I am creating a javascript for InDesign in order to search and replace some text. The text I am looking for has to be in a certain Paragraph style.
    This is what I have so far:
    app.findTextPreferences = app.changeTextPreferences = null;
    app.findTextPreferences.findWhat = '^p'
    app.changeTextPreferences.changeTo = ';'
    app.activeDocument.changeText();
    I need to find/change a return of a certain paragraph style to a semi colon. What is the script that I would use to search for paragraph style?

    try:
    app.findTextPreferences.appliedParagraphStyle = 'para style';
    If you want to replace the para style, use:
    app.changeTextPreferences.appliedParagraphStyle = 'new para style'

Maybe you are looking for

  • Multiple Version Issue. data not matching

    Dear all, pleas help me in this issue.. we have the Apo (DP) Cube.  we are running the reports on this cube.. when we run the query we are giving the Verion ( means week)  in the selections.. data is coming but.not matching with Apo..data.. we  assum

  • Help with Multiple Accounts on an iPad2

    My coworkers and I have received iPad 2s for use in our jobs. These machines were already equipped with a work iTunes account for purchasing and downloading apps at the company's expense. Now, we have been asked to create our own, separate, individua

  • No Internet Access while Apps configure with Static IP - How to resolve?

    Dear Legends, I have installed a development instance which my configuration as follows: OS - Oracle Enterprise Linux 5.7 64 bit Instance - R12.1.3 HDD - 500 GB RAM - 8GB IP - static - 192.168.1.10 Subnet mask - 255.255.255.0 Gateway - 192.168.1.1 --

  • Error while updating patch

    Hi All, I'm updating the patch SAPKE60009 and i'm getting this error and i checked the two objects. They are in consistent state only. But still getting the same error. Please suggest me. Phase CHECK_REQUIREMENTS: Explanation of Errors Some open conv

  • Error while saving web template

    Hi, Iam new to this forum , i have a problem and that is when iam trying to save web template, it is saying 'error in data transfer' and could not save. 2.when iam trying to save a query in workbook it is throwing error'workbook storage fault -310' .