Set fill color of all words in list

I want to change the fill color of all words in a document from a provided list of terms.
For example, the following script works perfectly in Quark:
set theIndexList to {"3rd Class", "4th class", "4th Class", "5th class", "5th Class", "7 lines of management/defense", "7 lines of management/defense", "7 Lines Of Management/Defense", "abalakov anchor", "Abalakov anchor", "Abalakov Anchor", "adze", "Adze", "Adze", "alpine rock", "Alpine rock", "Alpine Rock", "anchor", "Anchor", "Anchor"}
tell application "QuarkXPress™ 4.11"
     tell document 1
         tell story 1
             repeat with currentWord in theIndexList
                 try
                     set (the color of every text where it is currentWord) to "Green"
                 end try
             end repeat
         end tell
     end tell
end tell
The purpose of this script is to highlight words for later indexing. I need to read through the document, see words someone else has chosen for indexing, then add them selectively to the index.
InDesign CS, Mac OSX 10.3.9

>It's not a question of which program has more complex object model
Actually, it is largely. Search and replace in Quark relied on a combination of AppleScript whose clauses and a slightly odd definition of its text class. This made searches very simple, but it also meant they were restricted in what they could do. InDesign uses a more complex model, and exposes the full find/change engine; it's not as straight-forward, but it lets you do things that wouldn't be possible if they stuck to the whose clause approach.
In fact you can use whose clauses similarly in InDesign, with one catch: InDesign has a different definition of what constitutes text (there is only 1 text per story), so it will only work if you're looking for one of the classes like words, lines, text style ranges, etc.
I hesitate to rewrite the the js version in AS for CS because I don't have CS installed here. And there's an oddity involving color searches that makes it a bit more complicated than it should be. But it's very similar to the javascript.
> Because this is an AppleScript forum
I'm not sure what gave that impression, but it's far from so.

Similar Messages

  • [AS CS3] setting fill color opacity

    I want to change the fill opacity of a text box. So far I have only been able to set the opacity of the entire text box thru the blending settings of the transparency settings. The code I have below will set the entire text box to the opacity I want but the text inside and the frame will change and all want is the fill. How do I call only the fill of that box to set its opacity?
    tell application "Adobe InDesign CS3"
    tell document 1
    --something here to establish which text frame to change the settings of
    tell _Box
    tell transparency settings
    set properties of blending settings to {blend mode:normal, opacity:60.0}
    end tell
    end tell
    end tell
    end tell

    I think you are looking for "opacity of blending settings of fill transparency settings"?
    set opacity of blending settings of fill transparency settings of selection to 60 will set it to 60% for example.
    FWIW, the way I usually figure this kind of thing out is to set up an example box, put a weird value in the field I want to change (eg, 12.3) and then do a "get properties of selection" in Script Editor. Then I can search for that weird value and find out what the name of the property is that contains it. (In this case a little more complex than that, as it involved a search for transparency and then the sub-properties of the settings in the right transparency properties..)
    EDIT: Originally I thought you were talking about the color tint. Fixed.

  • Problem in setting a color(back & Fore) to a list in a panel

    I have a probem in setting the foreground and Background color of a list which is in a panel.Can anyone rectify the error in my program.I have given the appropriate syntax but the output color of the list is default color(Background is cyan and foregroung is black).
    import java.applet.*;
    import java.awt.*;
    import java.awt.event.*;
    public class listcolor extends Applet
         CombaPanel cp;
         public void init()
              setLayout(null);
              setBackground(Color.black);
              cp = new CombaPanel();
              add(cp);
    class CombaPanel extends Panel implements ItemListener
         List l;
         String name[]={"C","C++","Java",".Net","VB","Perl"};
         public CombaPanel()
              setLayout(null);
              setBackground(Color.gray);
              setBounds(40,40,250,250);
              l=new List();
              l.setBounds(20,10,150,100);
              l.setBackground(Color.black);
              l.setForeground(Color.red);
              for(int i=0;i<=5;i++)
              l.add(name);
              add(l);
              l.addItemListener(this);
         public void itemStateChanged(ItemEvent ie){}
    /* <APPLET CODE = listcolor width=400 height = 300>
    </APPLET>*/

    Hi Lakshman,
    Go to XCM setting of your ICSS application go to
    Comonents --> Customer --> ui.
    Create new ui element. Over here you can select default language for your ICSS web application.  Save it by giving some name like "lan1"
    Now go to Application Configuration --> Customer --> <your Configuration>
    Here click on "Display" Button of "Advance Setting" go to "ui Data" selection  box and select "lan1" from drop down box save it and restart your application.
    I hope this will open with your default language which you have set in "uidata " component "lan1"
    Regards.
    eCommerce Developer

  • Events Click Set Property Fill Color does not work.

    Setting Stroke Color does work.  Setting Fill Color is accepted by the user interface, but nothing happens.  I was applying this to a Basic Circle Shape.
    Until this is fixed, my alternative is to define a "custom event".  I have assigned a name to a "custom event" but can find no way to define it's action.  Can anyone help me with this or point me to the documentation on this?
    Thanks.

    You also need to register the fields which you want F4 event to become active for.
    DATA: it_f4 TYPE lvc_t_f4,
            wa_f4 TYPE lvc_s_f4.
      wa_f4-fieldname = 'CONNID'.
      wa_f4-register = 'X'.
    *     wa_f4-GETBEFORE = 'X'.   "if you want to trigger before F4
    *      wa_f4-CHNGEAFTER = 'X'. "or just after it
      APPEND wa_f4 TO it_f4.
      CALL METHOD g_alv_grid_ref->register_f4_for_fields
        EXPORTING
          it_f4 = it_f4.
    Regards
    Marcin

  • AS-CS3- Fill color of any paths, what are "plugin items"?

    I had a script that used to work in Illy 9 or 10. Now in CS3 I found it does not work 100% properly. I have some artwork that contains some "plugin items" on the page. WTH are these and how can I manipulate them? I've checked the item's properties and can't find a way to get the fill color or path item kind of data.
    Here's what my old script did: Get each path item on the document, check it's fill color. If fill color total (ink total) is over 290 then either set it to be only 100% black, or select the item and warn the user.
    This script is run by various PrePress people and other artists. Assume that no one knows where the document came from or how it was made. I am attaching a sample document you can check out. It appears like the "tree" object has been made by the Pathfinder filter but was not expanded. I can not assume that I can expand the object, artwork must stay the same except for color changes.
    Here is my current script:
    tell application "Adobe Illustrator"
    tell document 1
    set myCount to count path items
    set selected of every path item to false
    repeat with i from 1 to myCount
    try
    set myColorSum to ((cyan of fill color of path item i) + (magenta of fill color of path item i) + (yellow of fill color of path item i) + (black of fill color of path item i))
    if myColorSum is 400 then set fill color of path item i to {class:CMYK color info, cyan:30.0, magenta:20.0, yellow:20.0, black:100.0}
    if myColorSum > 290 and myColorSum < 400 then set selected of path item i to true
    end try
    end repeat
    set mySelectedPaths to count (path items whose selected is true)
    if (mySelectedPaths > 0) then display dialog "If you have any items with color sums over 290 then they are selected for you now (some have been fixed automatically). Please fix them, and run this again to verify. Gradients must be checked manually!" with icon 2
    if mySelectedPaths = 0 then display dialog "Document is OK -or- all items have been corrected. Save your document." buttons "OK" default button 1
    end tell
    end tell

    Thanks, I had a look at your sample file and the only route I can see is the expand that you don't want to use. You may just have to add the plugin items to the things the user has to check manually. The only thing that you can really do with plug in items is alter the trace options if it is a trace. Sorry.

  • Apply Fill Color to Group Item with Applescript

    Is it possible to set the fill color of a group item using applescript and CS3? The group contains paths and text that have the same fill color with no strokes.I am able to select the group and delete it or move it (with applescript) but have had no success in setting the fill color.
    Thank you in advance for help on this question. And thanks for everything I have picked up from browsing.

    Now that I am addressing the path items and text items of the group separately I am having some success. Now I am having difficulty getting the correct terms for assigning a Spot Color to the file. Here is a piece of the script.
    This works:
    tell application "Adobe Illustrator"
    set openDoc to document 1
    set ftClr1 to (first group item whose note is "Front3") of openDoc
    set ftClr1Paths to path items of ftClr1
    repeat with thisPath in ftClr1Paths
    set fill color of thisPath to {red:255}
    end repeat
    set textFrames to text frames of ftClr1
    repeat with thistext in textFrames
    set fill color of every line of thistext to {red:255}
    end repeat
    end tell
    Need help to set the fill color to a Spot Color that already exists in Swatches.
    Thanks
    Nick

  • Draw rectangle and apply fill color

    Hi
    anyone help me to draw rectangle outside artboard and apply fill color
    i want to draw 10 rectangle of same size and apply fill color using javascript
    Thak you
    appu

    Now that I am addressing the path items and text items of the group separately I am having some success. Now I am having difficulty getting the correct terms for assigning a Spot Color to the file. Here is a piece of the script.
    This works:
    tell application "Adobe Illustrator"
    set openDoc to document 1
    set ftClr1 to (first group item whose note is "Front3") of openDoc
    set ftClr1Paths to path items of ftClr1
    repeat with thisPath in ftClr1Paths
    set fill color of thisPath to {red:255}
    end repeat
    set textFrames to text frames of ftClr1
    repeat with thistext in textFrames
    set fill color of every line of thistext to {red:255}
    end repeat
    end tell
    Need help to set the fill color to a Spot Color that already exists in Swatches.
    Thanks
    Nick

  • I have a question about the calendar on the ipad2. I have multiple calendars in different colors. Some of the events are filled in with color. Others are just listed with a colored dot in front of the event. Any ideas why events ar showing up differently?

    I have an ipad2 and my question is about the calendar. I set up multiple calendars with different colors. Some of the events show up in filled color. Others only show with a colored dot in front of the event. I can't figure out why some show up one way and others show up differently? Any thoughts?

    On mine the ones that show on a coloured background are all-day events, the ones with dots and just timed events.

  • How to use AppleScript to set "character fill color" in Pages 5.2?

    For Pages 5.2 on OSX 10.9.3, what is the correct applescript for changing the "character fill" of text in pages. 
    If you highlight text, you do this via your mouse in the inspector by clicking "style," "advanced option (the gear wheel to the right of bold, italics, and underline), "character fill color (clicking on the multi-color circle, not the dropdown menu), and then choosing a color that comes up in the "colors" dialogue box.
    I've looked all over and cannot find how to use applescript to set the character fill color in pages. 
    In some examples (not directly related) I see "character fill" used. 
    In others, I see "colorfill." 
    Basically, I want to use applescript, embedded in a keyboard maestro macro, to change the background color of the text (not the text color itself) to particular colors. 
    Given the changes and updates to Pages this year, and to applescript, what's the easy way to do this?
    Thanks!
    Chuck

    Pages v5.2 still does not include selection-object, or character background color entries in its AppleScript dictionary, as does Pages ’09. Indirectly, using System Events, you can get the text selection in Pages v5.2, but then you can do nothing to change the selection. No assurances as to if or when Apple will mature the AppleScript dictionary support for Pages v5 series.

  • How do I auto set stroke weight, stroke colors & fill color?

    Hi,
    I'd like to make it easier for our 100,000 designers to use AI to make custom products using a laser cutter.
    Current Practice
    Designers open our AI laser cutting design templates, add their designs using the AI settings our online pricing system can read, then upload their designs to our website for instant pricing, making and shipping.
    The Problem
    Designers have to manually setup AI with settings that can be read by our online pricing system. If they get these settings wrong, our system can not read their designs. So they are rejected and can not be priced or made. This happens more often that you'd imagine.
    The Solution
    Designers do not like design rejections. So I'd like to eradicate them by providing our designers with a version of AI that provides the following settings only:
    * Set document to RGB
    * Stroke weight = 0.01mm
    * Stroke colors = RGB 0, 0, 255 and 255, 0, 0
    * Fill color = RGB 0, 0, 0
    This will mean designers have a very limited number of AI choices, with nothing to distract them or to get wrong. Which will result in less (or zero?) design rejections. And products made faster than before. Rejoice!
    Question
    How do we program our AI laser cutting design templates so that when they are opened in AI, they auto set AI settings as defined above?
    Thanks so much.
    Derek

    Ponoko wrote:
    Your first point - yes, that's what our system does currently. As a result designers get lots of 'how to fix' messages as a result of design rejections. We wish to reduce these rejections and resulting 'how to fix' messages by limiting their choices in AI - because this is where the problems are created.
    Ok, yeah gotcha, so customers/designers think they do it right (cough/laugh) upload, then get surprised to find out they didn't by your upload system. That's kind of what I thought. I feel your pain. ;-) I sense you want to reduce this aspect to keep the customers/designers happy and thinking they do nothing but work magic all day right? ;-) So you don't want to lose customers in the midst of frustration of file rejection thinking there files are right and your system is certainly wrong, when in fact it's the opposite. Good luck explaining that to a designer however, right? ;-)
    Ponoko wrote:
    Your second point - You go on to talk about using a complex "action" we could distribute within the design templates. Although I suspect this is different, the path we're thinking is to include something in the templates that, when imported into AI, sets AI with the color palette we need, line weight we need. Possible?
    As Monika hinted at you can't rigidly restrict or control what a user is allowed to do and use in Illustrator. You can try to reduce the parameters by saving the file as a Template.ait file, but even then they can muck about all day until they mess things up again, plus you have no control whatsoever even then as to whether they use fills, the stroke weights, etc. That is why I mentioned various things to manipulate the file once they deem it completed and ready to submit/upload. Basically a method to fix what they messed up or did incorrectly and instead set things as they should be for submission as I previously mentioned. I mentioned you may be able to create a complex Illustrator "action" action.aia that they run to process these requirements. I am not sure if such an action could be accomplished as all inclusive (perhaps though) otherwise you could as stated do it through scripting and a script they run: script.jsx to prepare the requirements, or an actual standalone helper app you create and provide like I mentioned above as well.
    I see for CorelDRAW & Inkscape you require SVG, why not change that for Illustrator also so all your 2D app submissions are SVG based? Then manipulate the SVG server side, point out the changes and why and have the customer approve the new modified SVG Preview of the needed changes and move along with the process from there? Make all the requirement changes on the server by manipulating the SVG. You should have access to all of the requirements: RGB color model, stroke weight, stroke colors, fill colors, create font outlines, image tracing? I am just tossing out ideas here, get your programmers busy, tell them to stop playing video games and "make it so". ;-)
    But even so, this then begs the question: What are you doing to circumvent the same issues for inept CorelDraw and Inkscape users?
    Since, they have the same freedom to do things incorrectly and misaligned with the requirements, just as Illustrator users do.
    Regardless though of the approach customers/designers may not like seeing certain things changed even minutely in trivial amounts and thusly be just as upset or up in arms with the changes to their pretty design files that they think were not needed in the first place, how dare you undermine them ;-). Same as seeing the file rejection from your system upon upload. Again I feel your pain. You have your Application/File requirements requirements stated nicely and plainly, it should be pretty easy for most, but sadly I guess not.

  • Setting all word 2008 windows to a specified zoom?

    I would like to get a script to set all word 2008 windows to a specified zoom setting. Ideallly, I would like to have an option pop up and ask me for the setting eg a percentage or page width, and page height. Would someone know how to achieve this?

    This Example might help:
    <pre style="margin: 0px; border: 1px solid #aaa; width: 800px; color:#000; background-color: #ccc; overflow: auto; font-family: Verdana, Monaco, monospace;"> tell application "Microsoft Word"
       --Example page zoom in Microsoft word
       set percentage of zoom of view of active window to 200
       delay 2
       set page columns of zoom of view of active window to 3
       delay 2
       set page rows of zoom of view of active window to 2
       delay 2
       set page fit of zoom of view of active window to page fit full page
       display dialog "End of Example"
    end tell</pre>
    hubionmac.com
    Message was edited by: hubionmac

  • Dynamically fill area with words from list

    hello all,
    i would like to fill the entire area of a flash movie with
    words.
    the movie starts out blank, but as time goes on the visible
    area fills with words from a pre-written list.
    ideally, the height and width of the words is randomized
    within a range i determine.
    i wouldn't mind being pointed to a tutorial that shows how to
    fill an area with randomly-sized rectangles, that might help.
    eventually, i want to be able to control the speed of the
    area being filled with an input device (mouse or external sensor)
    but first things first!
    am using flash 8.
    thank you,
    aya.

    You may want to check this out. It fills a space with words
    and keeps filling the empty space. I'ts open source so you can take
    peak inside.
    http://www.levitated.net/daily/levEmotionFractal.html

  • Automatically set the stroke color as fill color

    Hello all,
    I have a file with two squares with red and blue fill colors respectively and transparent surrounding strokes. I'm trying to find a way to automatically set the stroke color of each square to the respective fill color.
    Is there an Illustrator script somewhere that would achieve that? I am not aware of an internal Illustrator command for this purpose.
    Thank you

    I'm not a scripting guy at all, but getting an object's fill color and applying it elsewhere sounds like it should be scriptable. You should post the question in the AI Scripting Forum.
    The hitch I see here is your assertion that your objects have "transparent surrounding strokes." I could be wrong, but I believe there is actually no such thing in Illustrator. Through some simple experimenting, I conclude that an object's stroke set to "no color" by choosing the blank swatch actually becomes a stroke of undetermined, or perhaps zero, weight.
    Take an object with a stroke color and weight and set its stroke to no color. The weight goes away as well. One can't exist without the other, and vice-versa, with repect to stroke weight and color. Now enter a weight for that colorless stroke, and it again receives color; defaulting to black regardless of what it may have been previously.
    Similarly, if you assign a color where there is no weight, a 1-point weight appears by default.
    I'm not sure how/if that plays into your plans, but I just thought I'd ramble on about it here in case it's something you hadn't considered.

  • How do i list all word.docs for deletion of selected items

    want to clean out hard drive and want to isolate all word docs, excel sheets, etc.

    Search for them in Finder.
    If not already set, open Finder Preferences and set it to search the current folder (Advanced tab).
    Select the top-most folder you wish to search and type word into the search field.
    Select Word Document from the provided tokens.
    You should get a list of all your Word Document. You can do with them whatever you like from those search results.
    Ooops. I missed the rest of the story in the text:
    To get all the types, you can add multiple kinds to a search.
    In Finder, type Cmd-f
    In the row with Kind selected, hold down the Option key and click the button that has the ellipsis in it (…)--it was the + button.
    Add rows and change the to Kind is Other and enter the Microsoft document “kinds"
    Delete the first criteria row above the Any list

  • I have set my printer to print in color.  All my documents print in color, but I can't print the CD Case Inserts in color.

    I have set my printer to print in color.  All my documents print in color, but I can't print a CD Case Insert in color.  Can you help?

    That means it most likely a setting, Check the following. (steps written for windows 7)
    Go to the control panel and find " Devices and printers" and doulble click it.
    You should see the icon of your printer their, choose the one without fax in the name.
    Right click it and choose " printer properties".
    On the "general" Tab click on "preferences".
    In the new screen on the "layout" tab cick "advanced"
    In the new screen make sure "print in grayscale" is turned off and click ok severall times until all screens are gone.
    Try printing again. And make sure in the print screen color printing is also checked.
    Say "Thanks" by clicking the Kudos Star in the post that helped you.
    Although I work for HP my posts and replies are my own
    Please mark the post that solves your problem as "Accepted Solution"

Maybe you are looking for