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

Similar Messages

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

  • 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

  • Button to draw rectangle and oval...

    Okay so basically I have my paint method sorted...
    public void paint(Graphics graf)
         graf.drawRect(x,y,width,height);
         graf.drawOval(x,y,width,height);
    }then I have the buttons to draw the shapes...
    public void actionPerformed(ActionEvent ev)
              if (ev.getSource() == buttonRectangle)
                   x = Integer.parseInt(textx.getText());
                   y = Integer.parseInt(texty.getText());
                   width = Integer.parseInt(textwidth.getText());
                   height = Integer.parseInt(textheight.getText());
                   repaint();
                   arearect = width * height;
                   areatext.setText("The area is = " + arearect + "cm�");
                   areatext.setEditable(false);
              else if (ev.getSource() == buttonOval)
                   x = Integer.parseInt(textx.getText());
                   y = Integer.parseInt(texty.getText());
                   width = Integer.parseInt(textwidth.getText());
                   height = Integer.parseInt(textheight.getText());
                   repaint();
                   areaoval = width * height + 0.8;
                   areatext.setText("The area is = " + areaoval + "cm�");
                   areatext.setEditable(false);
              }however, when I click on buttonOval or buttonRectangle it draws BOTH shapes at the same time so the oval is displayed inside the rectangle. Any ideas how I can change it so when the buttonRectangle is click it draws the rectangle only, and when buttonOval is clicked it draws the oval only? Someone mentioned a couple of IF statements with some boolean variables (which I have declared in the class) but I do not know how to get it to work. I would appreciate any help.
    Thank you!

    How much simpler can a boolean flag be?
    Declare a private boolean flag variable on your class level.
    private boolean rectangleFlag = false;In your action listener, assign the rectangleFlag to true if ev.getSource() == buttonRectangle. Assign it to false if ev.getSource() == buttonOval.
    In your paint method do this...
    public void paint(Graphics graf)
         if (rectangleFlag) {
               graf.drawRect(x,y,width,height);
         } else {
               graf.drawOval(x,y,width,height);
    }

  • Applying spot color to imported graphic

    Hello, I'm hoping someone can help me. I used to use Pagemaker, and it was so quick and easy to import a B/W graphic and apply spot color to it from the color palette, but when I try to do this in ID (CS3), it either just adds color to the outline of the bounding box or fills the bounding box with color and leaves the actual logo graphic black (happens with either eps or tif). I've been trying to find the right way to apply color to an import through the InDesign Help Center, but I haven't been able to find anything that seems to help, and I need to be able to do this soon!! Can anyone please give me some tips about how to handle this type of situation? Much thanks and appreciation to anyone who can help!

    Thanks for both of your replies, but unfortunately, what you have both suggested is exactly what I've been doing, and nothing happens. And dragging the swatch onto the graphic hasn't done anything either. I've tried with both tif and eps files, but nothing happens with either kind of file. Anybody have any other ideas or help you can give?

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

  • Auto Apply Custom Color Palette to photo?

    I have two questions:
    1) Is there a way to automatically capture colors from a photo to automatically create a custom color palette? (for example, if I want a color palette of 20 colors, it would automatically pick 20 colors and create a palette).
    2) Is there a way to take a custom color palette, and automatically apply that palette to a photo?
    (I don't want to just use the color picker to choose my colors....I am looking for automation)
    Thanks!

    I'm not sure... maybe I could use index colors.... I will look into that. I have found some "color palette generators" online, which I need to investigate also. I just thought that maybe there was a feature directly in photoshop that might work.
    Attached are sample images. I would like to automatically take a color palette from the lilies, and apply those colors automatically to the forest. I would like the forest to have the same color scheme as the lilies, so that the two images would look very similar.

  • Drawing lines, rectangles and circles as objects onto a JPanel.

    Hi. I have to complete a task in school. The work is to create some simple 2D graphical editor. I'm new to java and I have some problems with this job, so I'm looking for help where it is possible...
    I created a JFrame and using it as a window. Into this JFrame I've added a toolbox (JToolBox) and "drawpad" - a JPanel. The toolbox wasn't any problem, but I aim to use the JPanel for drawing 2D objects. I tought about creating some container of objects, where I could put lines, rectangles or circles, each one with its properties (color, [x; y] coordinates on the scene, filling and drawing width) and then, draw this scene onto the JPanel.
    It should be something like windows Paintbrush. Can be simplier, but including the possibility to move and change properties of drawn objects.

    Well, there are two approaches to this that come to mind:
    1. Create an image. If this program is supposed to be like Windows Paint, the tools you are describing are only there for the sake of modifying a two dimensional image. In that case, I would recommend using a BufferedImage.
    The JPanel can contain a single JLabel. The JLabel is constructed in the following fashion:
    JLabel image_label = new JLabel(new ImageIcon(bufferedImage));...where bufferedImage is the image on which you will be storing the data. You can use bufferedImage.getGraphics() to get an object which will quite happily draw geometric shapes for you. Then, after each draw, you tell the panel to repaint itself.
    2. Store the shapes and create a component to draw them for you. You'd create a new JComponent class that would accept objects representing geometric shapes. You then override the paintComponent method on this new class to have it render itself according to the contents of the geometry objects. It would also probably be advisable to have all of these classes implement a common interface (which you would also create) so the rendering component could treat them identically.

  • How can I apply a current fill color to a stroke, then adjust that stroke color's build?

    Hi all, I'm trying to figure out a way to automate a simple, yet repetative process I do countless times a day. Ideally, I'd like to tie it to a keystroke to speed up my workflow.
    I work on line art and colorways for footwear, so the way I'm coloring these shapes and strokes helps to break apart the different materials and pieces of the shoe.
    While coloring line art, I work with Pantone spot colors as fills for closed path objects. I then have to manually apply that same color to the stroke, set the stroke to 0.5px weight, convert that spot stroke color to CMYK, and add 15% to the K value.
    I found some code in an older post for applying the actively selected object's fill color to the stroke, but I'm having but I'm having trouble with the next step of figuring out how to take that spot stroke color and convert it to a CMYK build that I can then add 15% black to. Is this something that's even possible? I've spent about an hour playing with the script and have only had luck matching the fill color or turning the stroke white. Thanks for the help!

    ok try this one, I added the spot color option
    // make stroke color same as fill color + 15% black increase
    if ( app.documents.length > 0 && app.activeDocument.pathItems.length > 0) {
        for (var a=0; a<app.selection.length; a++) {
            try {
                    var sel = app.selection[a];
                    var fillcolor = sel.fillColor;
                    if (fillcolor.typename == "CMYKColor")
                        var cmkycolor = fillcolor;
                    else if (fillcolor.typename == "SpotColor")
                        var cmkycolor = fillcolor.spot.color;
                    var col = new CMYKColor;
                    col.cyan = cmkycolor.cyan;
                    col.magenta = cmkycolor.magenta;
                    col.yellow = cmkycolor.yellow;
                    var black = cmkycolor.black + cmkycolor.black +15;
                    col.black = black>100 ? 100 : black;
                    sel.strokeColor = col;
                    sel.strokeWidth = 0.5;
            catch (e){alert(e)

  • Scanned pdf image into Illustrator (Live Tracing,filling colors and styles)

    Hi,
    I am a newbie in the forum.My first ever post. I have specific issue which needs your opinion. I have scanned a black and white sketch image which I bring on to Illustrator. The problem start after live tracing.
    After live tracing I need to fill it with a certain color (which I find absent in swatches).
    I have to update these sketches into an Indesign brochure which already has the original imported Illustrator sketches (done by some one else). So the original imported Illustrator sketch files have a color filled in and particular chalk like impression (style).
    So the problem is that I do not know how to fill the live traced sketch outlines with a color and then bring in a chalk like style to it.
    I need assistance badly..I have hit a bad road block.
    Thank you.

    I have never used the live paint feature, sorry.
    I typically always create everything with the pen tool, and some basic shapes, I draw a shape and then fill it with a color, gradient, or a stroke. This can see limiting at first not using a lot of filters but in the long run the precision control is worth it. I design entire websites this way, for example these are two sites I am currently working on….
    http://www.storagefront.com
    http://www.lenderstreet.com
    Lots and lots of fun illustrator work.

  • Is it possible to write a script that samples an anchor points underlying color and applies it?

    I was wondering if anyone with scripting knowledge for Illustrator can think of a script that would sample the underlying color of anchor points in a selected gradient mesh and apply it to them? I was just thinking of ways to speed up the process of creating a vector drawing based on a picture so that all you would have to do is model your mesh and then let the script apply the colors.
    Thanks

    no can do, there's no access to mesh point with scripting, sorry about that.
    have you tried Mesh Tormentor? it is free!!!, but I don't know if it will help with your problem
    http://www.meshtormentor.com/

  • Help me, How to insert Rectangle which fill color to image picture

    How to insert Rectangle which fill color to image picture and then It is saved file JPG

    > Is it possible to get the data from CSV files.
    Have you tried searching this forum?

  • How can I select and delete the fill color (white background) of a live trace (B&W) with in an actio

    How can I select and delete the fill color (white background) of a live trace (B&W) with in an action set?
    Illustrator CS4 in windows XP.

    Maybe Li[ve trace] is not t]he way[ to go
    I have some suggestion one leave it as is and use a blending mode of multiply to give it a color background like this
    leave it as is make it a grayscale tiff import int Illustrator and color it it in Illustrator like this
    Or trace over it with the brush tool aand then give it a color ground.
    Or do the original over and do a cleaner job with no tone or a minimum of tone. Then Live trace.

  • When i waned to buy and finished filling all the (*), i clicked on conifirm membership they worte this in a red color:  There was a problem processing your order, please contact our Customer Service team for assistance.Middle East

    when i waned to buy and finished filling all the (*), i clicked on conifirm membership they worte this in a red color:
    There was a problem processing your order, please contact our Customer Service team for assistance.Middle East & North AfricaBahrain: 80081097Egypt: 08000000447Jordan/Kuwait/Lebanon/Qatar/Yemen: English +44 207 365 0735Jordan/Kuwait/Lebanon/Qatar/Yemen: Arabic/French +44 203 564 4145Oman: 80077173Saudi Arabia: 8008446638Tunisia, Morocco and Algeria: +33 157324642United Arab Emirates: 80004443085Commonthwealth of Independent States (CIS): +44 207 365 0735

    Verify that everything about your Adobe ID and your country and your credit card match exactly
    Change/Verify Account https://forums.adobe.com/thread/1465499 may help
    -http://helpx.adobe.com/x-productkb/policy-pricing/change-country-associated-with-adobe-id. html
    -Credit card https://helpx.adobe.com/utilities/credit-card.html
    -wrong email https://forums.adobe.com/thread/1446019

  • Select same fill color and stroke color

    Hi
    any one help me to select same fill color with help of java script and stroke colot too
    Thank
    Appu

    Not saying it cant be scripted but what about just via the Illustrator "Select" menu:
    Examples:
    Select > Same > Fill & Stoke
    Select > Same > Fill Color
    Select > Same > Stroke Color

Maybe you are looking for

  • How to register/configure a Data Provider with Crystal Report Designer

    Hi, Iu2019m in the process of developing an ADO .Net XML Data Provider which works with Data Sets. I want to use this custom Data Provider through Crystal Report Designer 2008 so that I can access it from the u201CStandard Report Creation Wizard\Avai

  • After switch to a new workspace always 'Sign In'

    Dear all After I once switche to another workspace in Flash Builder 4.6 with CS Extension Builder 2 I am unable to compile my projects. (Switching back and forth does not help btw.) Building workspace starts, at 33% I'm asked to sign in the CSIED1 fo

  • Files not displaying in list view?

    I recently upgraded my MacPro (early 2008 8core) from Snow Leopard (10.6.8)  to Lion. At first i wanted to do a fresh install on my machine but soon realised it wasnt possible to import old accounts from another internal drive so i opted to upgrade t

  • Update directory in Java application after change.

    I'm making an application that creates a file in a directory and then takes that file and converts it to a ISO. The problem I have is when I run this command             try {                 String command = "mysqldump -u root " + db10 + " -r/data/b

  • Converting column store to row store

    Hello Everyone, I have a question related to the Column store to Row Store conversion: Is it always necessary to perform the conversion when all connections to the system have been stopped from the application level? what would be the loss if the con