[AS CS5] Get document's default fill color

Anyone know how to do this?
What I am trying to do is manually select a color using the color picker, then the script redefines and existing swatch with the same color value.
I tried:
set myNewColor to fill color of page item default
without success...

I had tried that, but it didn't work either. I think that's because I was using the line in a tell myDocument block, not tell application. It still isn't working, though.
Here is the script:
tell application "Adobe InDesign CS5"
     set myDocument to active document
     set myNewColor to fill color of page item defaults
     set mySpace to space of myNewColor
     set myValue to color value of myNewColor
     tell myDocument
          tell color "Color1"
               set space to mySpace
               set color value to myValue
          end tell
     end tell
end tell
Here is the error:
error "Adobe InDesign CS5 got an error: Can’t get space of swatch id 3." number -1728 from space of swatch id 3
The default color is a color sampled from a photo, but the "fill color of page item defaults" is returning a swatch:
tell application "Adobe InDesign CS5"
get active document
--> document id 7
get fill color of page item defaults
--> swatch id 3
get space of swatch id 3
--> error number -1708

Similar Messages

  • ProDAD Mercalli w/ CS5 Clip desaturation with 'auto-fill colors'

    Issue with proDAD Mercalli w/ CS5
    W7x64 w/latest patches of everything
    When selecting ‘Border Handling’, ‘Auto-fill colors’, the clip is desaturated.  Allowing a black border and the saturation returns to normal.  Simple option toggle, 100% repeatable.
    Settings:
    Glide Camera
    HDV clip
    HDV sequence
    Roll, Horiz and Tilt 50%
    No rolling-shutter
    No Avoid Border
    Border Handling=Best Stabilization
    Any ideas?

    using v2/latest rev
    usually works.  this is one of the few times i needed 'best' settings.

  • How to get PieSeriesItem labelText for fill color

    I've a PieChart, data comes from XML, I'd like to fill the pies with a specific color based on the labelField data of PieSeriesItem. For example if data's labelfield is A, fill color must be 0xFFFFFF... I know I need to use fillFunction but I wasn't able to get labelField property of PieSeriesItem. Here is a sample code;
                    var curItem:PieSeriesItem = PieSeriesItem(item);
                    return new SolidColor(0x0000FF * pct, 1.0);
                    if (curItem.labelField == "A") {
                        return new SolidColor(0xfecd1d, 1.0);
                    else if (curItem.labelField == "B") {
                        return new SolidColor(0xfe2f31, 1.0);
                    else if (curItem.labelField == "C") {
                        return new SolidColor(0x127ee1, 1.0);
                    else {
                        return new SolidColor(0xc2c2c2, 1.0);                    
        <mx:PieChart horizontalCenter="0" width="625" height="625" showDataTips="true"
    dataProvider="{mainResult.lastResult.record}"
    id="myChart" y="250" fontFamily="Verdana" fontSize="20">
            <mx:series>
                <mx:PieSeries id="labelseries" labelField="label" labelPosition="outside"
    width="100%" height="100%" field="totalnumber"
                              nameField="labelseries" fillFunction="pieSeries_fillFunc">
                    <mx:filters/>
                </mx:PieSeries>
            </mx:series>
        </mx:PieChart>
    Any idea?
    Thanks in advance

    That can happen if entries have a required attribute.
    *https://developer.mozilla.org/en/HTML/element/input

  • Trouble getting rid of default link colors!

    Dear Folks,
    I have created a ul list for navbar: reads just great in Safari, but has residual blue link color and underline - I have eliminated all styles in the source code, and have written styles in the CSS. Firefox reads all the visted and current links as default underlines, where I want color boxes.
    The header where the navbar is located is a secondary header with the div #header2 (no nav bar on the splash index page)
    What I wanted was a "tabbed" look, (dark background with light rollovers) which I got as long as I don't "visit" pages - then it reverts to blue letters with underline.
    Any help? Here is the code in the CSS
    In frustration, I set a separate link color for the footer for all pages - it read fine when each was a separate command, but combining it in CSS Shorthand made it not function.
    #footer a:link a:visited a:hover a:active {
    color: #CCC98F;
    text-decoration: none;
    and here is the code for the navbar in the secondary header:
    #header2 #navbar ul {
    font-family: "Gill Sans", Helvetica, Arial, sans-serif;
    font-size: 0.8em;
    font-style: normal;
    font-weight: normal;
    color: #CC9;
    list-style: none;
    #navbar li {
    float: left;
    list-style: none;
    padding: 0px 10px 15px 0px;
    margin: 0;
    #navbar li a:link, #header li a:visited {
    background: #2B2D16;
    padding: 0.2em 0.5em;
    font-family: "Gill Sans", Helvetica, Arial, sans-serif;
    font-size: 1em;
    line-height: 1em;
    font-weight: normal;
    color: #CC9;
    text-decoration: none;
    margin-right: 0.5em;
    width: auto;
    text-align: center;
    white-space: nowrap;
    word-spacing: 0.2em;
    letter-spacing: 0.1em;
    #navbar li a:hover {
    color: #D2A44E;
    background: #625214;
    #navbar li a.current, #header li a.current:hover, #header li a.current:active {
        color: #D2A44E;
    background: #625214;
    cursor: default;
    Martha

    In your CSS, you always need to define a minimum of 4 rules for the "states" of each link.
    Minimum states are:
    link
    visited
    hover
    active
    in that order.
    In your CSS, for #navbar li a (which is any link inside a list inside an element with id="navbar"), you have only defined the link and hover states.
    In the absence of a specific CSS rule for the visited state, the browser will always default to blue underline.
    Change your CSS as follows
    #navbar li a:link, #navbar li a:visited, #header li a:visited {
    background: #2B2D16;
    padding: 0.2em 0.5em;
    font-family: "Gill Sans", Helvetica, Arial, sans-serif;
    font-size: 1em;
    line-height: 1em;
    font-weight: normal;
    color: #CC9;
    text-decoration: none;
    margin-right: 0.5em;
    width: auto;
    text-align: center;
    white-space: nowrap;
    word-spacing: 0.2em;
    letter-spacing: 0.1em;
    If the #header li a:visited compound selector in that rule is doing nothing (since you have <div id="header2"> on the page but not <div id="header">) then change it or delete it.

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

  • [AS, CS2 / CS3] Get Fill Color When Nothing is Selected (defaults? preferences?)

    Hi,
    where can I find the active color, which is active (border and fill color), when nothing is selected.
    E.g. I can get the active styles, when nothing is selected with:
    applied character style of text defaults
    and
    applied paragraph style of text defaults.
    Where nac I find the equivalent for fill and border color?
    Thanks
    Tobias

    Thanks, that was for CS3. Where can I get that in CS2?
    I searched the dictionary of document and application, but got no glue ...
    Thanks
    Tobias

  • Photoshop CS5 New Document - RGB as default

    I work in the print industry, and do a fair share of copy + paste into a new photoshop document. My photoshop color settings are set as I need them (CMYK), but everytime I create a new document in Photoshop, it defaults to RGB, and I have to change it manually every time.
    Does anyone know how I can get this to default to my chosen color settings (the Save Preset option when creating New Document also saves size dimensions, which does not work for me) ? Thanks!

    Answer 2: There seems to be no way to uncheck size dimensions when saving the preset. Anything I try remembers dimensions.
    Answer 3: We discussed using an action as a workaround if needed, but were hoping to solve them problem. It's just frustrating because under the Save Preset option, it says "Document profile will default to working space if not included in the saved preset." It's not behaving this way, in fact:
    A.  It does not default to the last options selected in the new dialog window either.
    B.  Also, it does not recognize color settings of my clipboard content (from Illustrator). It defaults to RGB in Photoshop whether I copy/paste from an Illustrator CMYK workspace or RGB workspace.

  • How can I change the default fill and stroke colors for new shapes?

    As you can see in the following screen recording, after I change the stroke and fill color, all my subsequent rectangles are created respecting these new colors. But then when I delete all the rectangles, choose the rectangle shape tool once again, and start creating new rectangles, they start getting created with another color I had used some time ago (and I don't know how did it become the default color).
    http://tinypic.com/r/64jrwp/6
    So how can I change the defaults, so that the fill color is say #ddd, and the shape has no stroke at all?
    Thanks.

    When you have the shape tool selected you will see in the tool bar below - file edit etc a fill and stroke. This is where you can change the colours.
    You can keep drawing your shapes like you did in the video but then select the rectangle and change the colour from this tool bar. The reason it changes will be because you changed the colours you were using (foreground / background) that display in the left side tool bar.

  • How can I get back to default in System pref/ displays/ color. iMac 10.9.5

    How can I get back to default in System pref/ displays/ color?  iMac 10.9.5

    Select the iMac option.
    27" i7 iMac (Mid 2011) refurb, OS X Yo (10.10), Mavs, ML & SL, G4 450 MP w/10.5 & 9.2.2

  • Three Numbers questions:how do you change the auto default background or fill color from white to another color to use in multiple succeeding operations?  what is the formula to express the ratio of two numbers as a percent?

    Numbers questioons:
    -how do I change the automatic default background fill color so it stays a non white color?
    -what is the formula to express the ratio of two numbers as a percentage?
    -how do I create a signal formula to be sue against an entire column of data (for example, if I wanted to multiply the each cell in the column by the number 10)?
    -I have created a spreadsheet in Numbers with header and rows labelled and it contains formulas as well.  I now want to create a new 'blank' of this template with same header and row names and formulas, but without the cell entries from my earlier exerciser so I can use again in the future. How do I do this?

    Hi Matt,
    For short columns, the easiest method is to select the cell containing the formula, then grab the fill handle (small circle at the botom right of the selected cell) and drag down.
    For long columns, use either Jerry's suggestion (copy/paste) or Insert > Fill > Fill Down.
    Copy/Paste:
    Select the cell containing the formula. Copy
    Select from the cell containing teh formula to the end of the column. Paste.
    Fill Down:
    After entering the formula, and pressing enter...
    Click on the column reference tab to select the whole column.
    Command click on each cell above the one containing the formula to remove it from the selection.
    When cell with the formula is the top cell in the selection, go Insert > Fill > Fill Down.
    Pick whichever is easiest.
    Regards,
    Barry

  • Why can't I get a pdf document to print in color?

    I am going to school online and I need to print a pdf document that my instructor had me download from my online classroom.  I can get the pdf to print in grayscale but I can't get it to print in color.  It doesn't have anything to do with my printer, I have already worked with HP and they said it is not a problem on the printer side.  I have tried everything I can think of, but still can't get it to work - and other people can print it just fine on their computers, it has to be something wrong with my Adobe program or settings.  (And I don't know anything about any of that, so any very detailed help would be great!)

    Hi,
    Are you able to print any color pdf document in color print rather than grayscale using Adobe Reader and  the same HP printer, or is the issue specific to a particualr document?
    If latter is the case, could you please send the document to shilpi at adobe dot com?
    Which HP printer are you using?
    Thanks,
    -Shilpi

  • How to get the default selection color from JTable

    Hi, there,
    I have a question for how to get the default selection color from JTable. I am currently implementing the customized table cell renderer, but I do want to set the selection color in the table exactly the same of default table cell renderer. The JTable.getSelectionBackgroup() did not works for me, it returned dark blue which made the text in the table unreadable. Anyone know how to get the window's default selection color?
    Thanks,
    -Jenny

    The windows default selection color is dark blue. Try selecting any text on this page. The difference is that the text gets changed to a white font so you can actually see the text.
    If you don't like the default colors that Java uses then use the UIManager to change the defaults. The following program shows all the properties controlled by the UIManager:
    http://www.discoverteenergy.com/files/ShowUIDefaults.java
    Any of the properties can be changed for the entire application by using:
    UIManager.put( "propertyName", value );

  • Before this last upgrade, when I would create a file and do a "Save As" it would always open "My Documents" by default, which is what I prefer. But since the upgrade it opens in some annonomus file, to which I have to go through several steps to get to My

    Before this last upgrade, when I would create a file and do a "Save As" it would always open "My Documents" by default, which is what I prefer. But since the upgrade it opens in some anonymous file, to which I have to go through several steps to get to My Documents, and I can't seem to select the default in my preferences. HELP PLEASE!!!

    Before this update of what software from what version to what version using which OS?

  • Select same fill color/stroke color but not for entire document

    As the title imply's, I am wondering if there is a way to use the "select same fill color" and/or "stroke color" for just a group of objects in a document as opposed to document-wide.
    Thanks for any help you can provide!
    Tony

    Did you make the group into an isolation group?
    ( in the Control bar.)
    Or else you can select the objects you want to change, then Select Inverse and lock or hide.
    Isolation groups are usually handy for this kind of work though.

  • Currently using Flash Pro CS5,  getting error when trying to open CS4 file.  Error is "Slides and Forms documents are not supported in this version of Flash. Please open in previous version.

    Currently using Flash Pro CS5,  getting error when trying to open CS4 file.  Error is "Slides and Forms documents are not supported in this version of Flash. Please open in previous version.  Has there been a fix or patch to this issue or do I have to convert back to CS4 to open the file?

    Having the same problem in CS6.  I can tell you that converting back to CS4 will NOT solve the problem.  It seems when support for backward compatibility is discontinued, there's just no way to get
    any help at all?  Absolute failure to provide any user support so far...

Maybe you are looking for