Illustrator Scripting :: How To Set Color For Each Selected Object Via Eyedropper
May 30, 2013
When I run the script for an object selection, I want each object to have its color set to the underlying color as if I had used the eyedropper tool. Is this something that can be scripted?
View 1 Replies
ADVERTISEMENT
Mar 19, 2014
This problem happened only after I updated my Illistrator CS6. I'm on Windows 7.
View 2 Replies
View Related
Oct 4, 2012
is there a way to get position of any selected object? It seems like normally you have to dive into specific item like textFrames to get position, but was curious if there was a generic way of doing this for selected objects.
View 5 Replies
View Related
Feb 25, 2013
I want to change my selected text to a different cmyk color using javascript. I have tried and I do not know what is missing or what I am doing wrong.
if ( app.documents.length > 0 ) {
newCMYKColor = new CMYKColor();
newCMYKColor.black = 0;
[Code]...
View 4 Replies
View Related
Apr 2, 2013
I'm trying to create a script in CS5 mac os10.6.8 that will change the fill color of selected pathItems. I need a simple script that will change a selected pathItem to cmyk values 2,3,15,0. I will then select this script and implement the action in a batch of 600 files.
I wish this process could be recorded as an action but when I record the action "add new swatch" I have to manually input the cmyk values, which will take forever for a batch of over 600 files.
View 15 Replies
View Related
Nov 26, 2012
I need the finished script to create a rectangle with no fill and a 20% gray stroke to outline each artboard. I dug this up off these boards, which works perfectly except the rectangles created have no fill or stroke. certainly save me a lot of time drawing rectangles on a daily basis.
#target illustrator
var docRef = app.activeDocument;
var artboardRef = docRef.artboards;
for(i=0;i<artboardRef.length;i++){
var top=artboardRef[i].artboardRect[1] ;
var left=artboardRef[i].artboardRect[0];
var width=artboardRef[i].artboardRect[2]-artboardRef[i].artboardRect[0];
var height=artboardRef[i].artboardRect[1]-artboardRef[i].artboardRect[3];
var rect = docRef.pathItems.rectangle (top, left, width, height);
rect.fillColor = rect.strokeColor = new NoColor();
}
View 3 Replies
View Related
Jun 25, 2013
I've placed an rgb image and on top of that a vector square which I wanna give the same color as the bright green one in the rgb image. So I used the eyedropper tool on that bright green color. But as you can see it give a more dull greenish color. The document is in rgb mode. I would expect this more when I was working in cmyk but I ain't. Why isn't the eyedropper tool picking the bright green color? The image is in rgb, illustrator is in rgb, in photoshop I can see the bright green color in the rgb image. So why isn't illustrator using this bright green color with it's eyedropper tool?
Turns out the eyedropper tool only works correctly (while illustrator is in rgb color mode and the image placed is also in rgb), when the image placed is embedded and not just linked. After I dragged the image on the page and go to Links to have the image embedded and then use the eyedropper tool, I get the exact same color.
View 2 Replies
View Related
Feb 28, 2013
I have been scrolling through this forum and google, and have not found an answer.My Illustrator CS5 has been working all day, and I went away from it momentarily to pack some boxes for moving and the eye dropper tool started picking up colors that didn't exist in the placed image i'm grabbing from.(clearly not black within that circle...)
I "found" a solution on this site where you go into your eyedropper options and make sure your appearance boxes are checked, and they weren't so I did that, and now the eyedropper tool won't pick up any color at all. I have a project deadlines that require this program, and i've tried just about everything but re-installing.
Here are the way my settings are now:
View 2 Replies
View Related
Nov 15, 2013
How do I use eyedropper to pick up a gradient color? I have a color that has 45% opacity on it and I want the exact code of that color. If I use eyepicker, it will only pick up the original color (with 100% gradient). I tried using colourificator. Illustrator picked up that color but when I applied it to the object, it became a different color.
Is there any other way to pick up the exact code of colors that has an opacity? If I am to find the color that has an opacity manually, how would I find it in the color picker?
Below is an example:
1) First circle does not have an opacity.2) Second circle has a 45% opacity on the stroke, and I tried using colouricator to pick up the color3) Colourifator picked up the same color, but when I applied to the third circle, the colour is off.
View 1 Replies
View Related
Mar 3, 2014
I've been having this problem for a while with Illustrator CC but not with older versions. If I use the eyedropper to pick up a color, it captures that color and acts like it is applied but object/text continues to stay the older color. With text I have to use the type tool, highlight all of the text, and then select a color. This process if very annoying when I need to highlight and change several text boxes at once. I would like to just be able to click on the object/text and use the eyedropper tool to capture whatever color I need.
View 6 Replies
View Related
Mar 24, 2012
I have try Coreldraw X6 64bit in Windows 7, After use Color Harmony, I have a question about it, How to change color for selected object only, because color harmony change all color in object even it in different page ?
View 1 Replies
View Related
May 3, 2012
Code snippet to show me how to iterate through the selected text (not the frame!, not the words, only the selected chars) and make any change on the characterAttributes (size, color, etc.)?
In the property "app.activeDocument.selection" usually the selected objects are stored as an array. Now when I select characters in a textframe (or TextPath, whatever) there is a [Textrange] in it. I already tried some combinations like this snippet underneath but I still get errors, that selectedChars[i] is undefined.I'm on Illustrator CS4, Mac OS X, Javascript
var selectedChars = app.activeDocument.selection.characters;
for (i = 0; i < selectedChars.length; i++ ){
selectedChars[i].characterAttributes.fillColor = myNewCMYKColor;
View 14 Replies
View Related
Nov 30, 2013
What i do is use the direct selection tool and click an anchor and then click the eyedropper tool on that anchor point What is happening is the the outline color is being selected. So i found out Illustrator CS6 you have to hold shift while clicking the eyedropper. I tried that and still can't get the color of the underneath layer, the fill color stays white? Here is pic:
As you can see in the navigator window, the shade of red is that of the outline and not the apple underneath the outline. I tried shift+eyedropper and white is the only color that get's sampled.
View 6 Replies
View Related
Sep 6, 2012
I'd like to draw a box around some selected text (a textRange), however I can't figure out how to detemine the size or position of the text. The overall size of a textFrame is possible to find (not sure about position), but when you've got just a few characters selected I don't see any way to get the size or position.
View 6 Replies
View Related
Nov 15, 2013
Simple solution to aligning selected items to the artboard. I was going to create an action but then realized it would be more convenient for me to include it in my script file....I have a script to align objects with each other but they dont align to the artboard.
View 11 Replies
View Related
Feb 4, 2014
It is possible to apply the Convert to Grayscale(Edit->Edit Colors->Convert to Grayscale) for the selected items in illustrator cs3 in script (javascript)?
View 12 Replies
View Related
Apr 23, 2013
How can I get width that multiple selected items? (Not grouped.)
//---------- source code ----------
var mm = 2.83464566929134 //unit conversion. (point->milimeter)
var W = docRef.selection[0].width/mm;
alert(W);
//---------- source code ----------
View 3 Replies
View Related
Nov 22, 2013
I'm working with 27 artboard in illustrator for one project. I would like to select the object I need to get to in my layers panel and have illustrator "jump/navigate" me to the object where it resides on the artboard. Is this possible?
View 3 Replies
View Related
Jun 5, 2008
I wanted to ask if by chance any of the scripting gurus here happen to have written an AI script that will take a number of selected sublayers/sub-sublayers and move them so they become top-level layers?
I am really needing this very badly, given that After Effects can only handle AI layers as separate entities. So I find myself moving tens, even hundreds of nested sublayers to the top level all the time.
Is it possible this script exists already?
View 16 Replies
View Related
Feb 1, 2013
Is there a method to return an array of paths in the order they were selected, instead of their descending z-index (default behaviour)?
I'm writing a script that "connects" the centers of currently selected objects through a stroked path, and I want it to follow the order in which I select the objects, regardless of the stacking order.
View 13 Replies
View Related
Jan 22, 2014
I am using this script to find and replace words in layers. (The script only targets particualr words, rather than the whole layer name).
I would like to make it so it targets selected layers only.
I have found this script which loops through selected layers only, but I am not sure how to add the find and replace layer name functioality.
View 7 Replies
View Related
Mar 1, 2013
I'm trying to do some workflow enhancements. For our games we need to export to PNG at different resolutions for different mobile devices. I use a artboard per asset and currently manually export 3 times (using file/export/png with use artboards option), at 72 dpi, 144 dpi and 33.75 dpi.
I've been modifying a simple Javascript I downlaoded and have got it save to different fixed locations at different scales. All good. However exporting every artboard each time will cause issues with our version control system and take too long. It's not really a solution.
So I need a way to either only export the current selected artboards (which I believe can't be done) or somewho show the artboard range dialog that the system uses. Either of those would be a good solution.
var docRef = app.activeDocument;
var num_artboards = docRef.artboards.length;
var getName = app.activeDocument.name;
var fileName = getName.slice(0, -3);
[code]...
View 7 Replies
View Related
Apr 18, 2013
I've written a script to allow you to select an image to replace any number of selected files. Each file starts out as an embeded image with a .note to determine where the basis of alignment for the new file should be (i.e. "top," "bottom," "left," "right"). You'll find the code below:
#target illustrator
if (app.documents.length > 0) {
var docRef=app.activeDocument;
var docSelection = docRef.selection;
// ** Get new file
[Code]...
For some reason, the ".note" added at the end of the script gets erased once the script is complete. I can even get it to confirm that it applied the note to the image, but once it's complete, it's gone.
View 6 Replies
View Related
Feb 20, 2013
Is there a way to send a selected textFrame item to a layer using javascript?
I don't mind if it is send to current layer or some other way to accomplish the task.
(Using Adobe Illustrator CS4)
View 5 Replies
View Related
Oct 27, 2013
Problem:
How to read real number data from selected columns in an Excel spreadsheet into an illustrator javascript array variable, so that then I can use this information to construct an illustrator polygon.
Further information:
I am new to javascript (and not much of a programmer in the best case, but do have some basic knowledge using ancient languages like FORTRAN 88). I am sure I am just missing an important step here despite all morning browsing with Google for answers (something to do with variable definition I assume?). I have some survey data defining the outline of features in map view listed in a string of point (x,y) values in adjacent columns in excel (these x,y point values calculated from GPS data using a commercial program to converted 3D position to a 2D x,y by geoid projection, and then in excel to re-scale point locations to illustrator’s artboard). What I am trying to do is select columns of x,y value pairs in an excel spreadsheet, copy these values to the clipboard, and then develop an IA JavaScript to draw a polygon through the specified set of x,y points. It seems easy enough to script illustrator to draw the polygon once I get the values from the clipboard are in a javascript array (lots a good tips here [URL] ....), but pulling in the clipboard data seems to be beyond me. I have tried populating a defined array with various combinations of array declarations and app.paste(); or windows.clipboardData.getData('text/plain'); with no satisfaction. I then had the idea to try to pull in the clipboard to one long continuous string, place that in a text box (see see its structure), andthen read and split up the text in a loop to populate the JavaScript array…but that deposited a complex illustrator table object into my text box, and several attempts to force the clipboard to paste text did not work (again probably having problems understanding variable type declaration).
I would be happy to find any method of scripting the pull of the selected on an excel spreadsheet for use in an Illustrator script…so if I am making this all harder than it needs, be I would be grateful to know that also!
View 4 Replies
View Related
Jul 16, 2013
I can't seem to figure out a simple/direct method to identify the index of the selected item in a list box.
I feel like I'm missing something, but I can't seem to figure which (if any) property returns an index number if you use it with the .onChange callback for a ListBox.
The following code accomplishes what I need but isn't particularly efficient or elegant and can get muddled if you introduce multiple lists to check.
Any way to duplicate this same behavior with better code
var res = "palette {text: 'Example List', properties:{resizeable:true}
pnl: Panel{orientation: 'row',preferredSize: [400,600],
list1: ListBox{preferredSize: [400,550], properties:{multiselect:true,numberOfColumns:2, showHeaders:true,columnTitles: ['List 1', 'Subitem 0']}},
}}"
[Code]...
View 4 Replies
View Related
Dec 19, 2011
How to make the following script for adding serial numbers apply to multiple files in a selected folder?
var docRef = app.activeDocument;
with (docRef) {
var docName = name.substring(0, name.lastIndexOf('.'));
var artRight = visibleBounds[2];
[Code] .....
View 6 Replies
View Related
Apr 17, 2012
what/where is the pref to change the color of wire frame of a selected object- I'm trying to use the unwrap uvw and the fragile, winsome pale blue of a seam doesn't show up against the peak white of the wireframe.
(I must say my whole experience of 3dsmax has been awful because I can almost never clearly see what I am doing, as the whole interface color scheme is horribly designed)
here's a pic - spot the seam - this is in hidden line mode as you can/cant see, the pale blue line of the seam is blown out by the wireframe.
View 6 Replies
View Related
Sep 9, 2011
I thought this would be a simple tblsearch process, but as far as I can tell, there isn't a tblsearch symbol table for vplayer settings, so I need to get more creative I guess.
I want to be able to get the vplayer color of a selected object as part of a larger routine I'm putting together.
View 8 Replies
View Related
Jun 4, 2010
Is there any way in Illustrator to zoom to selected object (I want to maximize the selected object to the window)? There is the FitArtboard and the FitAll, but a ZoomToSelected.
View 14 Replies
View Related
Aug 15, 2013
Can I setup Illustrator to zoom in and out from the selected object(s) instead of mouse point on ALT and centre otherwise?
View 2 Replies
View Related