Setting perameters for text format change

I'm pretty new to the InDesign scripting thing. A very good programmer previously took care of these at my company but he left and so I need to try to solve some problems related to new work. I've worked with the programmer's files and made some basic changes, but have run into a wall on others. I tried for several hours to solve the problem on my own but cannot.  I tried saving these searches as GREP preferences and hoped to be able to convert them but can't figure that out. So I hope someone can help me.
I need my designers to be able to select a text frame and change the font for type formatted within very specific ranges. In this case, I need:
- type with 9pt leading and Interstate BoldCondensed type to be changed to 9 pt leading with Myriad Pro font. (Alternatively, instead of the leading I could have it change all Interstate BoldCondensed font in the paragraph style  — my GREP files tell me "zAgate:agateHed" — to Myriad Pro Bold.
and
- type at point size 6.75 ts and Interstate BoldCondensed to change to Myriad Pro bold font.
I guess it comes down to I don't know how to have the script find type that has more than one characteristics and then only change one.
What I've tried:
app.findTextPreferences.pointSize = 6.75;
app.findGrepPreferences.appliedFont = 'InterstateBoldCondensed';
app.changeGrepPreferences.appliedFont = 'Myriad Pro Bold';
app.findGrepPreferences.findWhat = "";
app.changeGrepPreferences.changeTo = "";
myStory.changeGrep();
...and ...
app.findMyTextObject.leading = 9;
app.findGrepPreferences.appliedFont = 'Interstate BoldCondensed';
app.changeGrepPreferences.appliedFont = 'Myriad Pro Bold';
app.findGrepPreferences.findWhat = "";
app.changeGrepPreferences.changeTo = "";
myStory.changeGrep();
...an alternative to the second, using paragraph style rather than leading ...
p.findGrepPreferences.appliedParagraphStyle = "zzAgate:agateHed";
app.changeGrepPreferences.appliedParagraphStyle = "zzAgate:agateHed";
app.findGrepPreferences.appliedFont = 'Interstate BoldCondensed';
app.changeGrepPreferences.appliedFont = 'Myriad Pro Bold';
app.findGrepPreferences.findWhat = "";
app.changeGrepPreferences.changeTo = "";
myStory.changeGrep();
In both cases, it just makes the font change regardless of size or leading.
Thank you in advance for any and all help.

Hi,
Dont mix Text and Grep preferences.
Dont use Grep if no Grep expresion needed.
Dont set findWhat if your criteria regards to formats only.
Remember to clean up preferences before and after
app.findTextPreferences = app.changeTextPreferences = null;
app.findTextPreferences.leading = 9;
app.findTextPreferences.appliedFont = 'Interstate BoldCondensed';
app.changeTextPreferences.appliedFont = 'Myriad Pro Bold';
myStory.changeText();
Above should work (assuming myStory is a proper object)
Jarek

Similar Messages

  • [svn] 3148: You can now use CSS styles to set the default text format for TextView.

    Revision: 3148
    Author: [email protected]
    Date: 2008-09-08 15:01:15 -0700 (Mon, 08 Sep 2008)
    Log Message:
    You can now use CSS styles to set the default text format for TextView. It no longer has any formatting properties. It supports the entire set of Gumbo text format styles.
    SkinnableComponent and Group now also support all these styles. However, skins such as ButtonSkin, TextInputSkin, and TextAreaSkin continue for now to specify instance styles on their TextBox, TextGraphic, and TextView, in order to give them a Gumbo look rather than a Halo look. So if you try setting, for example, the fontSize on the Application, it doesn't yet affect the text format of a Button, TextInput, TextArea, etc. unless you remove the instance style in the skin.
    Reviewer: Glenn
    Bugs: -
    QA: Lots of new stuff to test!
    Doc: No
    Modified Paths:
    flex/sdk/trunk/frameworks/projects/flex4/src/flex/component/TextArea.as
    flex/sdk/trunk/frameworks/projects/flex4/src/flex/component/TextInput.as
    flex/sdk/trunk/frameworks/projects/flex4/src/flex/component/TextView.as
    flex/sdk/trunk/frameworks/projects/flex4/src/flex/core/Group.as
    flex/sdk/trunk/frameworks/projects/flex4/src/flex/core/SkinnableComponent.as
    flex/sdk/trunk/frameworks/projects/flex4/src/flex/graphics/TextBox.as
    flex/sdk/trunk/frameworks/projects/flex4/src/flex/graphics/TextGraphic.as
    flex/sdk/trunk/frameworks/projects/flex4/src/flex/graphics/graphicsClasses/TextGraphicEle ment.as

    Nevermind guys - I did it using the 'rb_on.selected' command on the "on" radio button if the .txt file variable was "on", else the "off" radio button is selected.
    Thanks for taking a look though!
    Shaun

  • Format Painter in Word 2010 does not hold all formatting for text, anything change?

    I have been using the Format Painter tool since 2003. In the 2010 version in Word, I can duplicate what seems to be a bug. I have a line of text that a few words are blue and bolded. I wanted to copy that formating, so I click in the word (or select a
    portion of text -- works the same either way) and then paint over the text to be modified. The text I had selected was Calibri, bold and blue, my resulting text was Times, and blue...it lost the bolding and the font somehow. Has the tool changed in 2010?

    "shevaun" wrote in message
    news:[email protected]...
    I have the exact same problem. I'm finishing a document someone else created with wacky fonts/sizes/underlines/bullets/hanging indents etc all over the place.  I selected all, made it Arial size 11, set the line spacing to 1.5 and removed any underlines.
    I went into paragraph and set line spacing before and after to 0, and removed spaces between paragraphs of the same style.
    As an example of random behaviour here is what just happened.
    One piece of text is arial, 11, with a checkbox bullet.  When I look at its style while it is highlighted, there is no style selected.
    I use format painter to bring the top style down to the bottom one, and the bottom one changes to Times New Roman, 10, with the checkbox bullet and the new tab indent.
    [---] I think format painter should apply a style, period. Forget the 'Normal' style of the document, because when I'm matching format styles, I want that style, not whatever the Normal style is set to.
    The format painter only “records” paragraph formatting (including paragraph styles) if you select a whole paragraph. If you select multiple paragraphs, there might be conflicting settings, and the format painter can’t store all of the formatting.
    When you are reformatting a whole document, the format painter is a less useful tool. Instead, do the following: Make a printout of the document for reference. Then apply Normal style to all paragraphs (Ctrl+Shift+N) and manually apply the appropriate
    style to headings, lists, and any other paragraphs of your document. Modify styles to suit your needs.
    Stefan Blom, Microsoft Word MVP

  • Setting defaults for text tool in CC Acrobat Pro

    I am running the latest version of XI Acrobat Pro for Mac .
    I can set defaults for everything except the text typing tool.
    Can anyone help?
    Thanks very much!

    I am trying to select it, but the moment I let go of the left mouse button it disappears.

  • Best Practices for Text That Changes During Sequence?

    I have been using creating videos like the one here, in which text shows up every so often over the scene:
    Making The Walking Dead Pinball Machine - YouTube
    Thus far, I've been creating a title, duplicating it for each time the text changes, and loading each title into the sequence at the time I want it to appear. Is there a simpler way to create text that changes throughout a sequence, so I don't have to worry about each overlay having slight differences in position or other attributes?
    Just curious if there's an easier workflow for putting text over video.
    Thanks!

    You can also save yourself a few steps by duplicating the title through the Timeline by ALT+dragging it to the new location (which creates not only a new track item but also an independent new project item), then double-clicking the new track item to open it in the Titler for editing. But this refinement in your workflow has no bearing on the stated concern re: "differences in position or other attributes"--that's entirely a function of the changes you make within the Titler.

  • Colour values for text keep changing, how can I stop this?

    Hi, I am using a bright blue/turquoise text against a dark purple background. For some reason with some of the text "clips" the values keep changing to something else after I click OK? Why is this and how do I stop it from doing it? It seems not to happen with other ones I have done, with same values on same sequence.

    Sorry Tom, it's the most basic options; the "Text" video generator from the "Text" drop down menu in Effects, and then the "Colour Solid" video generator under "Matte" in Effects. I'm using DV-PAL at 25fps. To set the background solid colour, I originally colour picked from a logo supplied by client, and then noted down the values from the HSB sliders. I practically did the same with the text colour except I picked the colour from the colour wheel first and played with the sliders until it looked right on the background. I am using these colours for both "black screen" with text and for bottom corner third (style, not generator) name boxes. The difference between the two is that the name boxes have an opacity of 82% whereas the "black screen" versions have an opacity of 100%. Although there has been some change to the values of the background colour for the "black screen" versions (which I actually prefer), I am able to get these to stay uniformly now, the text however is at the original values for the original clips and then changes with the later ones I've done even though background values are ok. Whereas the values for the name boxes have changed with both the background and text on the last two. Sorry, hope that is enough detail but not too much : )

  • Text Format changes when Published Online.

    I upgraded from iWeb 06 to iWeb 08 and then my pages online stopped text wrap in the pages. The pages are fine in iWeb, but not when you visit the site. I have rePublished the site, but still the same.

    Once I upgraded, I never did a "Publish All to .mac", I just would use the publish button. After I deleted and made the change again and did a "Publish All to .mac, it worked.

  • Text format change from iWeb to browser

    Has anyone else had a problem with their text looking different (in both Safari and Firefox)? In one place, the font switches from 14 to 12. On another page, my indentations don't line up. Overall, I'm pleased with the software, but it is irritating that my website doesn't look as clean as it does in iWeb. Thanks.
    --Patrick

    Yes, and it can be much worse looking at a page from a Windows browser. I'm currently struggling with "white space" at the bottom of the text box on the blog page. The amount of space is very noticeable, especially if the background of your text box differs from the page background. In this case it has to do, I believe, with font settings, type, size, justification, and line spacing, even inserting pictures into the text box.
    Unfortunately, there isn't much that can be done. Every browser renders pages differently. It is rather appalling that the iWeb team can't even get their WYSIWYG to match what is seen in Safari, but what can you do? You can either keep things simple or design for a particular browser audience. Something like 85 perent of people use Internet Explorer for Windows, so I tend to think that's the best solution, if an unappealing one.

  • Wild text format changes in Firefox

    Using blank pages in iWeb (1.1.2), and entering text into text boxes, everything lays out fine in iWeb. Once published to my site, two weird things happen.
    In Safari, everything looks okay, except a number of lines that I really want to be single lines, instead wrap the last word to a second line (even though there's plenty of unused space on either side).
    The bigger problem is with Firefox (2.0.0.7), where instead of each line being single spaced, there's about 20 spaces between each line, making it worthless. Since a lot of people I'll be sending to this site use Firefox, this is a big problem.
    By the way, I use Firefox on hundreds of sites every day and have zero problems. So I don't think the problem is from any odd settings in my Firefox prefs.
    Any ideas?

    I have had some strange text behaviors as well. They seemed to be solved if I stick with a typical microsnuffed font such as Times New Roman or Arial and set the size.
    Browsers can still display your fonts strangely depending on how users set them up. If you choose a typical font you have a better chance of it being displayed correctly.
    Kurt

  • Text format changing on page load

    Hi all
    I have a rather bizarre problem. On page load my text appears and then I get a brief period of time where line spacing is correct and then it reduces?
    http://www.chatsworthklein.co.uk/home.html
    Any thoughts would be most appreciated as its rather annoying.
    Thanks in advance
    Mark

    Update;
    doesnt do it when I open the file locally?
    I now have the whole text area moving until a graphic appears?

  • How can I show only text edits and not text formatting when using print comments summary?

    Acrobat 9.3.0 for Mac.
    Here is the scenario: I used the Compare command to see the changes between 2 PDFs. The resulting file some edits are inserts and some are deletions. I want to print a comments summary only showing the text edits. In the Compare Option pane, I select Text and deselect Images, Annotations, Formatting, Headers/Footers, and Backgrounds. Now on the screen I see inserts are highlighted in blue and deletions are marked with sort of a caret and vertical bar symbol. So all looks good at this point. However, when I show the Comments List, I see addtional comments that indicate "Replace - The following text attributes were changed: fill color." Those comments do not appear in the page view unless I check the Formatting check box to show them. With Formatting unchecked, I print a comments summary and all of the "Replace - Fill Color" comments" appear on the resulting comments summary.
    I only want to show text edits, not text formatting changes. So questions are:
    1. Why, when the Formatting checkbox is unchecked, do the text formatting comments still appear in the comments list when they do not appear on the page display.
    2. How can I print only the text content edits and not show the text formatting changes when using Print Comments Summary.

    Hi,
    You can set ExecuteWithParams as default activity in the task flow then method activity to return total no of rows passing to Router activity if your method has value 0 then call Create insert operation else do directly to page.
    Following idea could be your task flow
    Execute With param (default) > SetCurrentRowWithKey > GetTotalNoOfRows (VOImpl Method)
    |
    v
    Router
    1. If pageFlowScope outcome is 0 then call CreateInsert > MyPage
    2. if pageFlowScope outcome > 0 then MyPage
    hope it helps,
    Zeeshan

  • Text format tags in contextual help

    Can someone point me to the documentation for text format tags available for tex entered in VI Documentation. I am familiar with the bold tag (blah), but I was wondering if there are any other tags available, for instance, to make the text italic...
    thanks

    Given that the help for the Documentation window under VI Properties explicitly refers to the bold tag and nothing else ("Use <B> and </B> tags around any text in the description you want to format as bold."), I'd say it's likely that there isn't any additional formatting available. There's no mention of any formatting options at all in the LabVIEW User Manual...
    Maybe someone in the LabVIEW Technical Communications group at NI is lurking and can offer any insider info that is available, but a quick tour of the palette of built-in functions with Context Help enabled suggests that bold text is the convention for input and output variable names and no other formatting is available.
    --John

  • Set default width for text box in Adobe Acrobat X

    Hello!
    I am using the textbox tool to add comments to a document. (not the Typewriter, but the Textbox, since that has more flexibility for formatting the text).
    I know how to set the default proprties for text size, color, background color, etc.
    Cannot figure out however to to set the default width. Every time I try to add a new textbox, it defaults to about 1 or 2 inches wide, so the text wraps around and around, and then I have to resize the box when I am done.
    Is there a way to change the default width?
    Thanks!

    Hi, Amonra
    I drew a box I like, and select, and then, Ctrl+C, and then Ctrl+V.
    And move the pasted box where to need, and resize the length. At least I get same width boxes.
    I don't know how to default it.
    I hope it may help you.

  • Custom render for some format of text

    Hi
     I would like to write add in for word, to render text custom format.
    For example, if the word document contains some key words, I will have to make/display
    highlighted or CLICKABLE
    without changing the word contents. Basically I wanted to change the word (override render engine), I'm new to office development, can someone shade some light on this.
    When the user open the document, I want highlight the pre-defind texts without changing the content. User should not be prompted for save when he closes the document. 
    -Bala
    Balamurali C

    Hi Bala,
    Base on my test, I find for the Find and Replacement method, it needs to change
    HighlightColorIndex value and the current document will be changed. (it will prompts the save window)
    I don’t find a way to highlight word without change, I think you could highlight the word in
    Open event and clear highlight in
    Close event.
    To deal with the save prompt window, you could set
    Saved property to true.
    There are some links that can help you:
    # Replacement.Highlight Property
    https://msdn.microsoft.com/en-us/library/office/ff195308.aspx
    # How Can I Search for and Highlight Words in a Microsoft Word Document?
    http://blogs.technet.com/b/heyscriptingguy/archive/2006/03/21/how-can-i-search-for-and-highlight-words-in-a-microsoft-word-document.aspx
    # Create Add-ins and Customizations for Office by using Visual Studio
    https://msdn.microsoft.com/en-us/library/jj620922.aspx
    Regards
    Starain
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Transfer footage iMovie 08 to iMovie 06 HD & change outline color for text

    I have a completed video that is basically all stills. I would like to transfer the stills in their current sequence and if possible with their current crop styles ie Ken Burns without having to start ALL over. Is this possible? Just downloaded 06 HD because I wanted more editing options that iMovie 08 seems to be lacking.
    Also, how do you change the outline color for text in titles? At one point it switched from black to white but I have no idea how it happened... now its back to black.
    Lastly, are we only allowed to place music exactly at the head of a clip or is there a setting I am unable to find that unlocks that "snap to" function?
    Thank you.
    Message was edited by: boogieon
    Message was edited by: boogieon

    Thanks....I was thinking that was probably it. Will be a little time consuming, but I'll feel better in the end knowing a vacation and bunch of summer stuff is back on tape for archiving.

Maybe you are looking for

  • Accessing SSRS report for Domain Users

    Hello, I have created the SSRS report and deployed it on report server. I would like to add browsing credential to all the users in the User Domain. so i have added the domain name on report server but even domain users are not able to access these r

  • When i load the page on line the link appear as well as the question marks in boxes on the background

    When i load my Iweb photo page on line the writen links appear as well as the question marks in boxes, on the background? what can I do for that not to appear? Blank Dance classes Albums photo Party night Wedding Fashion Links Contact Dance /___sbsst

  • Lookup column in calculated column formula

    I have a Lookup column(Discountfirst) which has Number. I also have another Calculated column(Finaldate) with Resulttype DateTime. One more column(DateofReceipt) in Date. My Calculated column formula looks like this =(DateofReceipt)+(Discountfirst).

  • Select images and text from one particular website do not load in Firefox

    As a website manager, I have been updating the text and images for a website. And I have found that on one page (http://nikkiyoung.biz/On-The-Scene.php), certain images and paragraphs of text do not appear in Firefox. I've tried it on multiple comput

  • Re: TDR with onboard Intel HD 4600

    Should i consider switching my ram to a 1600mhz ram based ones? If not, what settings should i use to have my ram set to 1600mhz so my system is stable.