[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

Similar Messages

  • How to change the paragraph style of every paragraph that only contains an anchored object?

    Hi,
    I have a document in word that needs to be converted into indesign. The document containts instructions, each step followed by an image.
    I've managed to import the document into Indesign, and applied a paragraph style with numbering to everything (text an image).
    Now, how to change the the paragraph style of every paragraph that only contains a image? I need to get rid of the numbering.
    Thanks in advance.

    Create two Paragraph Styles and name them Image and Non-Image. Apply the paragraph styles manually to the text containing image and not containing images.

  • How to change order of files in a folder in Finder?

    Is there a way of changing the order that individual files appear in a folder, other than the few choices provided in "View Options -> Keep Arranged By"? I want to re-order some jpeg file in a folder to show as slides using the "Slideshow" option in Finder, but in a particular order. I can re-arrange the images in Lightroom or IPhoto, but when I export them back to Finder, the original order, that I don't want, re-appears.
    Thanks.

    Hi RB_Stern,
    The simplest thing to is to put a number at the and of the jpeg in order that you like to have them. A other option is not possible.
    Good luck ...
    Dimaxum

  • In Pages (5.5.1) can I create multiple Paragraph Styles within one paragraph?

    In Pages (5.5.1) can I create multiple Paragraph Styles within one paragraph. 
    I need to make a table of contents for my Mater's Thesis and want to use the automatic table of contents feature.  I want the first sentence of a paragraph to have a different paragraph setting than the rest of the paragraph.  Is this possible?
    Thanks!

    Nice of you to be doing this for your Mother's Thesis.
    There are several issues here:
    1. A Paragraph Style is what it says, the style for the paragraph
    2. You can format text within a paragraph by applying a Character Style
    3. Pages 5.5.1 lets you apply formatting to overall text for the T.O.C. but not parts of it and you can not retain that formatting as a Paragraph style
    So in answer to your question, no.
    You will need to create the T.O.C. manually and unfortunately as Pages 5.5.1 can't create bookmarks (just one of over 100 missing features) you will be unable to link the T.O.C. to the referred pages in the list.
    Peter
    Apple's marketing slogan:
    Pages 5.5.1 - Can't Do That!

  • How to change header font style in Spark DataGrid?

    I'm looking since last week for a way how to change the font style of the header in a Spark DataGrid. It drive me nuts that I can't find a way to do this. Have anyone one an idea how to achieve it? Any help is appreciated.
    Thanks,
    - Artur

    Hi,
    Some styles won't work because some text styles got hardcoded into the DefaultGridHeaderRenderer's Label. You'll run into this issue not just with the DataGrid headers but also things like the Panel's title and other places where we have text. One way to get around this issue is to create your own custom headerRenderer based on the default one and then redefine the headerRenderer skin part in the skin.
    First, create a subclass of the DefaultGridHeaderRenderer and tweak the "labelDisplay" to your liking (or even just take out all the styles and style it on your own as you had earlier using your custom header renderer's name). Example below (I named it "CustomHeaderRenderer"):
    <?xml version="1.0" encoding="utf-8"?>
    <skins:DefaultGridHeaderRenderer xmlns:fx="http://ns.adobe.com/mxml/2009"
                                     xmlns:s="library://ns.adobe.com/flex/spark"
                                     xmlns:mx="library://ns.adobe.com/flex/mx"
                                     xmlns:skins="spark.skins.spark.*"
                                     xmlns:comps="comps.*">
        <fx:Declarations>
            <!-- Remove fontweight="bold" and other styles as you wish
                 Must be a component and not a factory. -->
            <s:Label id="labelDisplay"
                     verticalCenter="1" left="0" right="0" top="0" bottom="0"
                     textAlign="start"
                     verticalAlign="middle"
                     maxDisplayedLines="1"
                     showTruncationTip="true" />
        </fx:Declarations>
    </skins:DefaultGridHeaderRenderer>
    Next, create a simple DataGrid skin by creating a subclass of the  spark.skins.spark.DataGridSkin in MXML and defining a new headerRenderer  component in the fx:Declarations section. Example below (I named it "CustomDataGridSkin"):
    <?xml version="1.0" encoding="utf-8"?>
    <skins:DataGridSkin xmlns:fx="http://ns.adobe.com/mxml/2009"
                    xmlns:s="library://ns.adobe.com/flex/spark"
                    xmlns:mx="library://ns.adobe.com/flex/mx"
                    xmlns:skins="spark.skins.spark.*"
                    xmlns:comps="comps.*">
        <fx:Declarations>
            <!-- Must be a factory with the right id for the skin part -->
            <fx:Component id="headerRenderer">
                <comps:CustomHeaderRenderer />
            </fx:Component>
        </fx:Declarations>
    </skins:DataGridSkin>
    Last, assign your new skin as the skinClass of your DataGrid (either in MXML or as a style):
    <s:DataGrid skinClass="comps.CustomDataGridSkin">
    I know it's not pretty, but it's the result of trading off between having completely custom skinning vs. having knobs to tweak every style. Hope this helps.
    -Kevin

  • How to change the component styles (inside panelFormLayout.)

    Hello friends,
    Can anyone help me, How to change the component styles where components (af:inputtext) inside af:panelFormLayout.
    i changed all of the components one by one style, inlinestyle .. from the inspector. By result is nothing.
    how to extend blafplus-rich and override some of the components style?
    thanks for your helps

    thanks alright but i want to learn again after this.
    Which component has a content or border or how can i find list components attributes for change style?
    For example i want to change document content pane, what will i write to css. i am little knowledge about css.
    Thanks for help

  • How to get all paragraphs style and their fonts of a  indesign file and write all info with para info into txt file with scripting

    how to get all how to get all paragraphs style and their fonts of a  indesign file and write all info with para info into txt file with scriptingstyle and their fonts of a  indesign file and write all info with para info into txt file with scripting

    I write the script this one works
              var par=doc.stories.everyItem().paragraphs.everyItem().getElements();
      for(var i=par.length-1;i>=0;i--)
           var font=par[i].appliedParagraphStyle.name;
            var font1=par[i].appliedFont.name;
             var size=par[i].pointSize;
            WriteToFile (par[i].contents  +   "\r" +  "Style  : " + font  + "\r" +  "FONT1  : " + font1  + "\r" +  "Size  : " + size  + "\r", reportFilePath);
                            function WriteToFile(text, reportFilePath) { 
        file = new File(reportFilePath); 
        file.encoding = "UTF-8"; 
        if (file.exists) { 
            file.open("e"); 
            file.seek(0, 2); 
        else { 
            file.open("w"); 
          file.writeln(text);  
        file.close(); 
    Thanks for all your support

  • 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

  • How can I change the paragraph style of the Table of Contents entries themselves?

    From what I can see, all Table of Contents entries are the same font, size, indentation and layout when the book is viewed in Portrait mode on an iPad. I have long subheadings in my Table of Contents, and they get truncated!
    How can I modify the style definition of the TOC entries themselves so that they will display in a smaller font size with less indenting, etc.?

    Modifying the TOC: http://support.apple.com/kb/PH2752?viewlocale=en_US
    Have you tried altering the style of the default items on the TOC page?

  • How to apply multiple paragraph styles to one sentence?

    I'm using paragraph styles but is not helpful because I'm trying to apply 2 different styles within the same sentence which is not working.
    To make it work I select the sentence, apply the style, for instance "xfont-regular" then I select the word within the sentence that I want it to have a different style and I choose from the font list maybe italic so that it looks "something like this"
    Obviously by doing this, I'm loosing all the benefits of using p styles and of course it's so time consuming. Is there any way to break the sentence, keeping it in the same line, so that I can apply different styles to it? and still keep the benefits of just going to the styles and make the changes to the whole document that have that style applied.
    Thank you

    pchinique wrote:
    I'm using paragraph styles but is not helpful because I'm trying to apply 2 different styles within the same sentence which is not working.
    To make it work I select the sentence, apply the style, for instance "xfont-regular" then I select the word within the sentence that I want it to have a different style and I choose from the font list maybe italic so that it looks "something like this"
    Obviously by doing this, I'm loosing all the benefits of using p styles and of course it's so time consuming. Is there any way to break the sentence, keeping it in the same line, so that I can apply different styles to it? and still keep the benefits of just going to the styles and make the changes to the whole document that have that style applied.
    Thank you
    As Diane King mentioned, nested character styles may work for your need. Her example was an initial dropped capital (multi-line first one or several letters of a paragraph.) Dropped caps are a specific type of nested style - always the first one or more characters in a paragraph, two or more lines high.
    To use the general kind of nested style, you need to be able to identify the word or words within the paragraph that gets the nested character style. For example, the third word, or the first two words after the first semi-colon. If there is no pattern of word(s) that can be identified by position or sequence, it's possible that a GREP style can be used to find a common pattern of characters and apply a character style to it, for example a telephone number, date, or currency amount that's identified by a dollar sign, pound, or yuan.
    Search InDesign Help and Google for "InDesign nested style," "InDesign grep style," and similar terms (without quotes) for details. There have been many discussions of GREP on this forum.
    HTH
    Regards,
    Peter
    Peter Gold
    KnowHow ProServices

  • Multiple paragraph styles within one cell?

    Maybe I'm missing something real simple but I'm having a bit of an issue with styles.  What I'm trying to do is have the name of a tool in one paragraph style and the description (separated from the name by "-") in another paragraph style - all within the same cell of a table.  Instead, when I try to change styles it changes all text within the cell.  Even if I go back and highlight the tool name and change it to a different style than the description it changes all text including what is not highlighted.  If anyone has a solution I would greatly appreciate it!

    Thanks, Dave!  Nested styles works perfectly.  I figured the solution would've been something simple like this.

  • How to replace a paragraph style with object style

    Hi,
    I am having this issue lately that in paginating a newspaper I have to do all premium post with a Rectangle Border. the problem is that the text is in the grid.
    Is there anyway that, while I add a specific paragraph style to some parts of the text, I can automatically give this text a specific Object Style (like stroke rectangle)
    Does it make sense?
    Thank you very much

    Michael,
    I think that I did not explain myself as I should have. The problem is not really related to links but more of a automatic replacement issue.
    Every time I do this newspaper I include a new text information and the location of the Headers changes in every single case.
    http://i.imgur.com/sgQ2wIK.jpg
    In the link, the blue paragraphs need to be replaced with the respective Header Icons that you see on top and everytime this location of the headers in the newspaper changes due to the different number of posts in each specific category. Now the problem is related on how to autoaticaly replace this string in blue with its respective header
    thanks a lot in advace for all your help

  • Change default paragraph style!!

    How do I change the default paragraph style? I can't stand double spaces but that's what I am stuck with
    I want freeform, not body
    Application is Pages 2.0.2
    Message was edited by: Spprrw

    Welcome to the Apple forums
    By default, the Pages developers chose to use 12 point after paragraph spacing which will make it appear as a double space between paragraphs. You need to create your own default template. Set up your document with the line spacing, 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.

  • 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

  • How do I update paragraph style universally?

    I have a 68 page document to which a paragraph style has been applied to each page. I changed the font for the paragra[h style and it's not updating. I have to go page by page and do a clear overrides and then reapply the style. There has GOT to be an easier way, but I can't for the life of me figure out how. Any ideas what I'm doing wrong? THanks!

    Search the particular paragraph style and replace with the same style with Find/Replace window.

Maybe you are looking for

  • Size and resolution of web gallery

    Hello, I have inserted a web gallery via a web widget and would like to adjust the size of the slideshow thumbnail and resolution of the images within the slideshow, is this possible? The slideshow thumbnail is quite small and I understand that you c

  • How do i download images from mail?

    How can i download or save to phone images from a email? how do i do it on an attached image and one that is just in the email message itself? Thanks so much Message was edited by: soccerdogs89

  • OS Booting problem

    I have a HP Pavilion dv6-1030us Notebook PC with Core 2 Duo processor and total 4 GB ram . Earlier with XP os it was working fine. But as I formated laptop and try to install any OS it gives fatal error. After removing 1 RAM which is having 2 GB ram

  • Question on VO bind variable ?

    Hi, In one of my VO query's Select part, Im calling a function which accepts a parameter that comes from the pageContext eg: select abc(:1) from xyz; Any ideas on how to set the bind variable in the select clause of the VO query? Thanks!!

  • Last logon time from list of computers?

    Hello, I'm looking for some type of script that will query a list (c:\script\computers.txt) of computers and return the last logon date and user. I do not want to do this from active directory, but instead want to get the data directly from the machi