I had to reinstall Acrobat Pro X today because combining pdfs was sticking at "checking security".
After the re-install everything went fine with that, but now ExtendScript shows only itself in the application target menu. (Previously had all of CS6 and CS5 apps in there)
I tried to reinstall CS6 illustrator to see if that added it, got a few install errors, but mainly about not being able to delete files. No luck in restoring the app menu.
If I set
#target illustrator
I get a "illustrator undefined" error, and no script execution. in the middle of a major project which includes scripts in illustrator and combining pdfs in acrobat.
I am trying to (among other things) move a pathpoint that was added on a pathitem rectangle. The add of the pathitem goes well, the add of the pathpoint to the rectangle is fine, although when it it is "added" it picks some arbitrary position, hence the need to change the position, starting with the anchor.
I typically write in VB.NET (2013), as I am doing here. Using Illustrator CS6.
In VBScript, documentation shows: newPoint.Anchor = Array(75, 300)
Using that syntax, I get a pre-complier error in VB.NET, as "Array" is a type and can't be used as an expression.To create an inline array in VB.NET, I would normally use:
newPoint.Anchor = {75, 300} Using this syntax, I get a runtime COM-exception error.
but when i do it like that, the bject's name comes out as undefined when accessed like this dlg.btnPnl.cancelBtn.name or like this: dlg.btnPnl.children['name']
but adding the object then naming like this works-
dlg.btnPnl.cancelBtn.name = "Cancel";
I'm using illustrator cc and the extendscript guide for cs6 (couldn't find a newer one). Did the syntax change?
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.
I need to find a way to convert a LOT of ai files, individually, to low res pdf's. Preferably with the presets I want, not some defaults. I'm not interested in an action. I was hoping for a droplet, script, or something similar.
I did find this and it looked promising... [URL] ....
That almost worked. Ultimately, for some reason, it couldn't see the ai files sitting in the specified folder.
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 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.
I am trying to change the color of all items on and under a specific layer.I have been successful changing the color of specific types of objects (paths), but I need to accommodate all the types on the layer and sub layers.
I can recurse to as many sub layers as I expect, but how do I accommodate the page Items, path Items, group Items, compound Path Items, etc.I was thinking of pushing everything to an array, but I have no experience with arrays...
I'm new to illustrator scripting (but not to javascript or programming. I have an AI file that has multiple layers. each layer has several items that are supposed to be of same color. I have an array of HEX values.
I would like to loop over all items in a single layer, select them and change their color to some given HEX. Once that works, I will run on all HEX entries in array and save each variation in a separate PNG file.
For the first part i wrote some script (see below), but i do not see any change in the file after i run the script. No errors and no change. I run the script once i select all items in a specific layer.
My code:
function hexToRgb(hex) { var result = /^#?([a-fd]{2})([a-fd]{2})([a-fd]{2})$/i.exec(hex); return result ? { r: parseInt(result[1], 16), g: parseInt(result[2], 16), b: parseInt(result[3], 16)
I managed to write this javascript. It automatically changes the colors from one swatch (byName) to another (byName) in my opened illustrator file. But if this one color doesn't exist as a fill or outline color in a file, I get an error message, because the script can not detect the color. The script stops. I am working on a batch of Illustrator files with 3 colors to change, but some files contain just 1 or 2 of the colors.Is there a command for javascript which says: "Only change the color, if the color appears"?
Here is the script:
var docRef = app.activeDocument; with (docRef) { var findColor = swatches.getByName('TSB Dark Blue').color; var replaceColor = swatches.getByName('TSBDB').color; [code]....
I have written a small application in .NET that gives color to Illustrator files.I have a layer with 100 color items (paths with a fillcolor). Each one has a unique name. Through that name my program looks them up, takes the fill color and applies that color to another path.Recently there was a change in Design, the drawings that I had to provide of a Fillcolor were no no longer pathitems but rasteritems (imported from photoshop). I thought ok no problem instead of setting the Fillcolor property I'll use the Colorize method on the rasteritems. It worked fine but now and then I came across a situation where raster-item didn't get the color. After digging in to it I saw that it was because some colors are Pantone colors and the colorize method on rasteritems only takes RGBColor or CMYKcolor objects. How to do it with the pantone colors?
I want to overprint a PMS colors using Applescript. I though if I changed the property of the selected items fill color from (fill overprint:false) to (fill overprint:true) it would work. This doesn't seem to change a thing.
This is the script I am currently using:
script ChangeOverprint tell application "Adobe Illustrator" local docRef
[Code]....
This is the picture of a simple document I created. The elipse has fill overprint:true. The polygon has filr overprint:false. The original value for the property fill overprint was false. I changed it in the script to true. Which the log shows it changed.
I am working with scripting in Ai, fill gradient color in TextFrame. I search in this forum but the other topics fill color to path or line. For now, I can make a gradient color, but I don't know how to apply it to textframe.
how to show the color picker dialog in Illustrator programmatically?
In photoshop that's really easy, just:
app.showColorPicker(true);
In Illustrator I couldn't find any reference to such a method or other possibility to show the dialog programmatically, that you would normally get when double clicking on the fill color square within Illustrator.
Is that possible by using app.executeMenuCommand or some other method?
I am writing a script that opens the color picker dialog in reaction to a click on a button. I want to be able to get the chosen color and use it within the script.
I have a number of art items on a document, some of them are filled with spot colors and some of them are with process color.Is there any method by which I can find out which color type(spot or process) is applied to the selected art item?
I have a script that will select text Frames, but I have come into a situation where I need to exclude any text frames that do not have a fill color. I do not see a filled Boolean property for character attributes or text Frames.
This is what I used to select all text on all visible and unlocked layers. I dont see a way to exclude textframes that have no fillcolor.
if (app.documents.length > 0 ) { var doc = app.activeDocument; var numTextFrames = 0; for ( i = 0; i < doc.textFrames.length; i++ ) { try { textArtRange = doc.textFrames[i]; textArtRange.selected = true; } catch (e) {} } }
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?
i want to get the swatch color of active document . i use 3 to 4 colors both cmyk and pantone which is in swatches now i want to get their values using script.
I've been looking for scripts online that would create a color swatch legend to list the colors used in my illustrator file. I found this (see below) and tweaked it to place properly on my particular page, but it adds everything in my swatches panel to the legend. Ideally, I'm looking for a piece of script to add that would only add used swatches to the legend, or a script that would only add spot colors to the legend.
var docRef=app.activeDocument; var SwatchBoxSize=24; var swatchBoxSize=parseFloat(SwatchBoxSize); var swatchBoxTop=swatchBoxSize+314;
I am trying to grab specific spot colors and move them to separate layers for our cutting software. In this case I am trying to grab "perimeter cut" and move it to a layer called "tc 1" I get the following error when I try to run the script.
#target Illustrator var idoc = app.activeDocument; var ipath = idoc.pathItems; if (ipath.typename == "SpotColor") { if (ipath.spot.name == "perimeter cut") { ipath.move(tc 1, ElementPlacement.PLACEATBEGINNING). } }
I am trying to create a script who could act as an Autocad plot (ie convert each color to black, with a different line weight).
Here is the first script I melted, who create my Black swatch
if ( app.documents.length > 0 ) { var myDoc = app.activeDocument; //add Black swatch var newSwatch = app.activeDocument.swatches.add() var newColor = new GrayColor(); newColor.gray = 100; [Code] .........
And here is the second one, who replace one color by Black (it don't change the text, nor the lineweight yet…
if ( app.documents.length > 0 ) { //test de dialogue function csDialog() { var fabGroup = app.activeDocument.swatchGroups.getByName('Fabrics'); var allFabs = fabGroup.getAllSwatches(); var fabNames = Array();
I have a couple thousand AI authored EPS files with a specific swatch name (SpotBlack) that I would like to rename (black) -- is there any method to do this en masse, preferrably outside of Illy using a text editor?
I'd like to create a script that checks the current document's color profile and checks it against a string, for example "sRGB IEC61966-2.1". My studio has a script that performs various functions to make sure that all the layers are visible/unlocked, checks for stray points, etc., and we'd like to add a check to the color profile because we handle a large number of files and this setting is overlooked a lot.
It's alright if this value isn't writable through script (we can just pop up an alert letting the user know that they need to change it), but I can't find where to actually read this setting! We're currently working on Macs and with JavaScript, but any nudge in the right direction.
I want to open a doc, run a script that selects all paths of a color, say 255,0,0 or 50,0,20,4 and changes that color to black or another color I specify and also changes the stroke. Is this possible? I can't see how i would do it?
Is it possible to find out how bright is an color? I need to find the darkest color in document's swatches. My solution would be to convert (script internally, without actually making any changes in document) swatches to grayscale, compare them and pick the darkest. But how to convert swatch defined in undefined mode (they might be in lab or cmyk) to grayscale?
I found in 'js scriping reference' a method "convertSampleColor", but I have no idea how to use it. Any examples?