Illustrator Scripting :: Change Layer Colors Within Layers Palette In CS5?
Apr 3, 2012For example I would like to make my images layer Green and my copy layer Red in my layers palette.
View 6 RepliesFor example I would like to make my images layer Green and my copy layer Red in my layers palette.
View 6 RepliesI'm using a mac running illustrator cs5 and have about 4 thousand eps files (all vector paths filled with black) that need to be assigned colors randomly from a defined color palette (25 custom swatches). The first 2 swatches should be omitted- they aren't relevant to this task.
The script should open the file select all vector elements and assign a random color form the defined custom swatch palette then save the file and move on to the next.
how to change the colour of the selected layer in the layers pallete? It's quite annoying the way it is (Dull grey/blue) and sometimes hard to see what layer's selected?
I prefer the brighter blue on my other computer!
Is there a way to assign one of the default layer colors with javascript? like light blue, light red, or green.
View 3 Replies View RelatedWhen I set C to 40% and MYK to 0% the program automatically change to other values in all four columns. Is it some kind of default settings? If so, how can I change it?
View 3 Replies View RelatedI'm trying to change the colors of a pathItem corresponding to the string value of several text fields in my document. I've been successful in changing the fill and stroke color of the pathItem, but I can not find any reference in the Illustrator Javascript Guide for accessing additional strokes and/or fills that have been applied to the object in the Appearance panel.
View 1 Replies View RelatedI'm new in scripting and i need to make a script that moving all layers into a single layer (in Illustrator i press CTRL+A then CTRL+G in layers and works) but i need that in script.
View 2 Replies View RelatedI have two layers. Upper most with text is locked.Bottom layer is an image I have applied a transparency/gradient mask for the raster image. Now, seems my layers palette is stuck in a mode called 'Layers (Opacity Mask)'.Not seen this before, but this is CS6. How do I get out to the main, root level of the layers palette?
View 1 Replies View RelatedI am trying to turn every layer in my .ai file to a raster image without flattening to one layer.
-The big issue I am dealing with is the agency that just built a paralax site for us refuses to export to PSD. I have tried every possible way to do this but keep getting the file is to big message. To add to it they had it all on 1 layer. I was able to release to sequence, but now am trying to see if rasterizing the objects will work.
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.
Is there any way to change the background color of the Layer palette? (CS6/Mac here)
Working with white type and objects is very frustrating.
I would like to make the active layer name the same as the document name. I know very little about scripting. I found this script:
var idoc = app.activeDocument;var ilayer = idoc.activeLayer;var filename = idoc.name;ilayer.name = filename;
It does almost what I need it to do. except that it also copies the ".ai" in to the layer name. Is there some way to modify this script to have it exclude or delete the file extension?
Can you change permanently the default highlight color(s) for layers in new documents? CS6
View 2 Replies View RelatedOkay my script to change text frame color changes the color of all text frames hidden or not.
I need it to only change visible text frames.
if ( app.documents.length > 0 ) {
newCMYKColor = new CMYKColor();
newCMYKColor.black = 0;
newCMYKColor.cyan = 0;
newCMYKColor.magenta = 0;
newCMYKColor.yellow = 0;
[Code]...
How to go about making it only change the color of text frames on the active layer? In the final script I will hide all other layers so if it could be done by a visible attribute more easily that would work just as well.
this is how i usually duplicate a layer, by dragging and dropping to the new layer icon at the bottom of the palette. it is not letting me do that.
also, when i select a a single, or group of layers and move them around in the palette, i thought it used.
We are working with a company that will be sending us DWG files. They do not use the same layer colors as us and I am trying to find a lisp that would allow me to set up a table with the layer names and the color I want them to be so that I can quickly change all the layers to our companys color standards.
Example:
Layer 1 = Color 1
Layer 2 = Color 15
Layer 3 = Color 10
Etc.
I don't know a lot about lisp but I figure if I could find a lisp that did this I could plug in my layer/color assignments and it would work.
Is there any functions and methods that dont work on a dialog window versus a palette?
I sk because i was playing with some UI stuff and i almost got everything working but it doesnt work as a dialog just palette.
I am writing a script for Illustrator. I created a palette with some buttons. I like to keep the palette open while working in Illustrator. The problem is, that the buttons don't work. For example, I have a delete button that should delete my active selection. When I change the Window Type from palette to dialog everything works correctly.
var w = new Window ("palette");
w.orientation = "row";
w.text = "Path Transform";
var f = File ("/C/icons/corner-tr.png");
var corner_tr = w.add ("iconbutton", undefined, f );
var corner_tl = w.add ("iconbutton", undefined, f );
var corner_br = w.add ("iconbutton", undefined, f );
var corner_bl = w.add ("iconbutton", undefined, f );
corner_tr.onClick = function () {
selectedObject[0].remove();
createLines();
}
on my Windows 7 home computer I am able to create UI progress bars and popup messages for my UI window and everything works just fine. Now, I come to work on the Macintosh and they don't work so well. In this question, I would like to learn if there is a technique to bring a palette to the front when one is created, such as for this progress bar example, on a Mac. The palette appears deactivated and in back for me. It is unseen most of the time because it appears in the center of the screen behind the window by default, and when I move my window we can see the palette but there is no progress bar going on.
As you can see in the screenshot, my main window is deactivated because I attempted to get the progress bar active by deactivating the main window, obviously not successful. I also set the palette to active, which did not work.And, as I have implied, on my home computer on Windows things appear just as expected with the progress bar working and palettes appearing in front and active.
When I run a script that brings up a palette window from ExtenScript toolkit the window behaves as I expect.But when I load the same script from illustrator (ctrl+12) the window does not show, or is instantly closed.
View 5 Replies View RelatedI'm working on a rather complex piece of artwork in Illustrator CC with the latest Mac OS, with several objects on each layer.
Whenever I click an object, its layer in the Layers palette auto-expands, pushing all of the main layers off of the edge of the palette. I then have to click the little arrow to collapse the layer so I can see all of the other layers and (quickly?) get to the one I need.
I am using a Magic Trackpad (don't ask) so this task is particularly arduous, as the cursor is often somewhat difficult to maneuver when attempting to target small UI elements. My display height is only 1050 px, so naturally I would rather not make the layer thumbnails any smaller (25 px.)
Is it possible to disable or defeat the auto-expanding behavior? Placed in bold
I've got a script that creates a palette that does some calculations when a button is pressed - but something in the script is failing silently. (this question is about how to debug things like this, not what the problem is in my specific script)
I've read the debugging tips in the Javascript tools guide, and based on that, re-opened the script in the Extendscript Toolkit instead of my usual text editor, chosen Illustrator, and hit the green 'Go' button. But, either I've missed something fundamental, or this isn't designed for palettes - the script runs in Illustrator, successfully pops up the palette, considers the job done, pats itself on the back, and closes the palette before I can begin debugging the button.
I'm looking for something where I can test the palette doing regular Illustrator work and see debug messages, set breakpoints, etc. I've tried the old-school approach of just filling the code with 'alert("blah")'s but it doesn't work - my code reaches an
" if(app.activeDocument.selection.length){ alert(1);} else {alert(2);} "
and doesn't alert either of them, or give any error message.
If I was working in a browser, I'd just plonk in a "console.log( app.activeDocument.selection )" and browse the object structure to see what's going on, is there any Illustrator equivalent?
I just installed the X4 trial. I still have X3U installed but not open. I keep the layer palette open all the time.
I open an existing image and the current layers are displayed correctly. I open another image and it looks fine too. I then copy the 2nd image or a layer from the 2nd image and paste it as a new layer onto the first image. No matter which image is active, the layer palette continues to show the layers from the 2nd image until I close it. At that point there are no layers displayed in the layer palette at all; not even the background. If I do a paste as new image or even just create a new image, there is nothing in the layer palette then either. It doesn't change if I close and reopen the layer palette. The only way I have found to get the layers to display is to click on something outside of PSP X4 such as an open browser screen and then go back to PSP X4.
Sometimes, when I'm working on a design, I realize that there's just a handful of colors in Swatches. Why does this happen, and how can I recover the whole palette?
View 5 Replies View Relatedwhen I added a layer mask to a layer, it would display in the palette as the alpha channel, which was very handy. Now, when I add a layer mask, it only appears as the mask icon; i.e., gray square with white circle in the middle. I have no clue what I did to change from the one to the other, but I would certainly like to get the alpha representation back!
View 3 Replies View RelatedA lot of times I'll be working on multiple .psd files and as I'm moving between files I'll notice that all the layers & layer comps will disappear from their palette
[URL]
I can bring them back by doing something like clicking on the text tool and then clicking on a text item on the stage. It's annoying because it takes a couple of clicks for the palette(s) to redisplay.
Is this a bug or is there a setting in preferences that can control this?
When I select a layer, it is highlighted in grey (in the layers palette) and I am unable to edit it. My current process for making a layer editable is as follows: Select layer (highlighted in grey)Double click layer (opens "Layer Styles" dialogue box)Close "Layer Styles" dialogue boxLayer is now highlighted in blue and can be edited. I am currently running Photoshop CS5.1 on a windows machine which is using Windows 7.
View 2 Replies View RelatedI try to open mulitple ai files through palette dialog but it fails on Error:8702, there is no document. But if i change to var win = new Window ("dialog", "Batch"); the open file works well.
var txtSourceFolder = win.add("edittext",undefined);
var btnOk = win.add("button",undefined,"Run");
btnOk.onClick=function(){
try
[Code] ....
I'm trying to write a script that renames a layer, and group within the layer, then an object within the layer (but not a part of the group) and have it run in a loop.
Here's what I've got so far, the group rename doesn't work.
#target Illustrator
var doc = app.activeDocument;
idLayers(doc)//IRename layers
idGroups(doc)//Rename groups
function idLayers(doc){
[code]....
I haven't put in anthing to rename the single object yet since I cant even get the group rename to work. I suspect that the group re-name section isn't working because I'm either using bad syntax or an invalid command.
I am trying to create a script that adds custom spot colours to the swatch pallet. I've manage to put together something that works (I've adapted an existing script), but the colours added are not spots, just CMYK colour swatches.Also, I need the script not to error if the swatch already exists.
//Add Custom Swatches
var docRef = app.activeDocument;
function cmykColor(c, m, y, k) {
var newCMYK = new CMYKColor();
newCMYK.cyan = c;
newCMYK.magenta = m;
newCMYK.yellow = y;
newCMYK.black = k;
return newCMYK;
[code]....
I have about 300+ product labels that are in Illustrator, and some of them have an incorrect rich black color swatch. What I have been doing is going through and changing the color pallette to change them manually. Essentially going to the instance of black and changing them to regular black.
Is there any sort of script that can do this? The files are in CMYK.
Otherwise I have a lot of monotonous file editing to do.