Illustrator Scripting :: Change Values In Action
Sep 13, 2012
I frequently record Illustrator Actions. My actions are quite long, but they all involve three common steps:
-Assigning Notes to shapes
-Assigning Swatches to shapes
-Selecting shapes that have a specific notes
I often need to re-record my actions to repeat all the steps, but to change the notes/swatches that are selected/assigned during the action.
Illustrator has a re-record command. This command is great for changing the value of the note in number 3 of my list. However, it does not work for items 1 & 2 in my list. For these items I have to delete the old step in the action and then record a new step with the new swatch/note.
I know macros in Microsoft Office have an editor which allow you to change values in actions. Is there anything similar for Illustrator actions?You can save an Illustrator action and open it in Text Edit. However, all the attribute/swatch values are saved as weird strings, so I don't know how to change them.
View 4 Replies
ADVERTISEMENT
Jun 8, 2012
I created an action to change the width of an image. I execute the action using DoScript javascript method.
The first action Obj1 will select the whole image and second action Obj2 will open the transform panel and change the width of the image.
app.Open("D:LWW_Castoff45991_09_03.eps")
app.DoScript("Obj1", "LWW")
While (app.ActionIsRunning)
Thread.Sleep(500)
[Code]...
In the above code, the second action 'Obj2' is not getting executed. Both the actions are getting executed individually. Let me know the problem and how to execute both the actions.
View 5 Replies
View Related
Mar 26, 2013
I want a script that can convert RGB value to CMYK values.
I've seen this thread which explains a script to round up and down:
[URL].....
but is there a script that i can actually define lets say the colour is yellow and in RGB it looks ok because its in RGB mode so you change it to CMYK and you have 6% - 9% cyan and you only want yellow
is there a script out there that i can say
if
cyan = 6%
yellow = 80%
magenta = 0%
black = 0%
then change to
cyan = 0%
yellow = 80&
mangenta = 0%
black = 0%
I don't mind writting the code for each colour that needs to be converted as it would only need defining once but how would i make this script?
View 8 Replies
View Related
Feb 18, 2013
I am searching for a simple automated Find and Replace script, the idea is that in Excel the Find and Replace with texts are located. The script finds the textblock in Illustrator and replaces it with the value from Excel "New number".
Example Illustrator:
Example Excel Find and Replace:
View 1 Replies
View Related
Oct 14, 2013
Is there any chance to assign values to an artboard?
I've experimented with “tags”, but they only work for pageItems. (if the item which includes the stored data is deleted, the data is also deleted)
It is simple data like v1=true, v2=false, … I want to assign. And it needs to be saved within the illustrator document.
View 4 Replies
View Related
May 21, 2013
Any good way to convert decimal values to fractions for use in inch measurements? I have a script that works great but it returns values like 5.5638 and I'd rather it return the closest fraction answer like 5 9/16. 1/16ths would be great, but I'd settle for 1/8ths.
I started trying to come up with a large if with lots of > and < conditions, but it might be better not to reinvent the wheel.
View 13 Replies
View Related
Mar 1, 2012
I have several Illustrator JavaScripts that I've written with the ESTK. A lot of these scripts involve resizing the artboard or artwork to specific sizes. Instead of forcing the user to manually input the dimensions they want into text fields, I just stored a half-dozen or so "presets" in an array.
Then they can select one of the presets from a dropdownlist, or go ahead and input a custom size. These presets are the same for multiple "resize" scripts, so it would be nice to store those presets in a separate file (i.e. presets.jsx) that my resize scripts could reference, so when I need to add or change a preset, I could just go to that one shared file, and all the scripts would be updated.
Is it possible to do that? If it is, a quick example of how to load the variables from another file.
View 1 Replies
View Related
Jul 10, 2013
I've seen on this forum a lot people saying that in CS6 you can now call an action from JavaScript. However, I haven't been able to find what the syntax is to do that in the reference or the guide. Can you actually do this now with Javascript?
View 2 Replies
View Related
Jul 17, 2013
I need to create an action. A simple one. The idea: One path is selected, a user runs the action, it makes a copy of that path, moves the copy, select both the path and its copy and makes a blend.
I tried to record that action, but Illustrator does not record the paths selection/selecting.
Even a simplier task: How, in general, having one path selected, select an item/path above or below it? And how to select them both?
I can make a script for that, but the requirement is to keep it as simple as possible: have an Action only without any scripts, if possible.
View 2 Replies
View Related
Sep 9, 2013
I'm playing around with attaching an action to a button in javascript but I'm just not getting it
I've tried putting it into a function like so
function deleteSwatches () {
= app.doScript("Delete Unused Swatches", "Custom Art Actions");
}
Then calling the action with said function but it doesn't respond.
View 2 Replies
View Related
Dec 20, 2012
rename a layer of illustrator like document file name? (with an action)
View 12 Replies
View Related
Oct 9, 2012
I need to do a form of automation, but wanting to execute this from another process (self-made application). Adobe Photoshop has this mechanism called "Droplets" that are executable based upon Actions defined in Photoshop (as far as I can understand). Is it possible to let AI do some work for you from an external application as with Photoshop (assuming you are able to execute the executable once it has been created)?
View 4 Replies
View Related
Mar 8, 2013
I would like to automate an action set that selects a raster image (linked file) that has been grouped with vector art and then converts that selected raster image into a vector (live trace)
I'm using cs5 on a mac. As far as format goes I have hundreds of eps files that all have at least one raster bitmap tif which was imported as a linked file and then grouped with vector art. So I will like to run a batch script command that will select only that bitmap raster image (because I want to maintain the present vector art in the file) and convert that bitmap tif to vector- and save the file which will hopfully be in vector format.
View 2 Replies
View Related
Jun 3, 2012
Is it possible to trigger actions from the actions panel using javascript? I see that you can do this with AppleScript but I've written everyting so far in javascript and don't know AppleScript, though could learn it if I need to.
I'm writing a script that creates a lot of complex graphic files and have all the prototypes done except for wanting to change the color of a few of the points in a mesh object. Apparently this can't be done in javascript, so I was hoping to mid point in the script, trigger an action from the panel to edit the mesh, then let the script carry on its way.
Is this possible?
View 5 Replies
View Related
May 17, 2013
I have a piece of art on "Layer 1" that i need to shrink and duplicate to "Layer 2". The two layers are always named the same. I'm working in CS5.
View 6 Replies
View Related
Apr 16, 2013
I tried following action script code to save PDF file with color profile attached:
var saveOps: PDFSaveOptions = new PDFSaveOptions();
saveOps.colorConversionID = ColorConversion.COLORCONVERSIONTODEST;
saveOps.colorDestinationID = ColorDestination.COLORDESTINATIONWORKINGCMYK;
saveOps.colorProfileID = ColorProfile.INCLUDEDESTPROFILE;
doc.saveAs(pdfFile, saveOps);
But got following errors: error an Illustrator error occurred: 1346458189 ('PARM'). What is the correct way to save PDF file with color profile?
View 1 Replies
View Related
Oct 3, 2011
I created an Action to batch export a folder of .ai files to create 300dpi .png's of the .ai file's artboard. I did this by simply recording "Export...as png" with my desired settings then Batch running the Action on desired folder of .ai files. The files were successfully exported, the trouble is that the exported files lack a .png file extension. My intent is to take these PNG files and merge them into a single PDF using Acrobat Pro. Unfortunatly, without the .PNG extension, Acrobat Pro does not recognize the file types and does not let me use the Combine Files feature on them. Going back and manually adding a .png at the end of the exported files defeats the time-saving purpose of Batch Processing all together. Is there something I am missing or doing incorrectly? I have included screenshots of 1) My Batch Action settings 2) folders showing files without .png extension and 3) visual of what I see when I am trying to combine PNGs into a PDF.
View 4 Replies
View Related
Jul 18, 2013
I have an attribute blocks and this att block has two tag values , is there a simple code for to change 1st tag values automaticly according to 2nd values ?
for example :
1st tag (50x50) - 2nd tag ( 100 ) ==> 50x50-100
if i enter 201 valuse to 2nd tag then 1 st tag has to change as 100x100
if i enter 501 valuse to 2nd tag then 1 st tag has to change as 150x510
I attached a jpg file for explain much better
View 9 Replies
View Related
Jan 18, 2014
I've had this problem before, and it randomly popped up again today.
This time restarting Ai fixed the issue the first time. I just don't know if this was human-error/setting on my end, or a minor bug to report.
So I create a CMYK Ai doc. Create some black text and/or shapes. Then decide to change color to rich black by manually entering CMYK values (in this case, 60, 40, 40, 90), select ok. However, the colors revert back to original percentages (75, 68, 67, 90).
In past versions, it's happened once or twice, and restarting Ai didn't solve the first time.
View 6 Replies
View Related
Oct 23, 2013
I'm trying to create an action to change two specific colors in ~300 different logo files (.ai and .eps). I'm coming from Photoshop so I assume there is a way to create a droplet from an Illustrator Action but that's a different topic.
The colors are Pantone 143 and 287 which need to be changed to 143 U and 287 U, respectively.
Here are the steps that I think I need to record for my action: Unlock all layersAdd new colors to swatch boardSelect all layersRecolor Artwork... (Edit -> Edit Colors -> Recolor Artwork... This step is not recorded?)Save file The problem is that the Recolor Artwork step is not recorded.
View 8 Replies
View Related
Feb 6, 2013
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...
View 3 Replies
View Related
Feb 4, 2013
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]....
View 2 Replies
View Related
Sep 30, 2013
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?
View 4 Replies
View Related
Aug 15, 2012
Is it possible to change the cursor while a script is running? I have several scripts which work on large numbers of objects, and it would be very useful to have the cursor change to the spinning color wheel or hourglass while the script is looping away.
I understand that Adobe's JavaScript Toolkit would let you build a progress-bar dialog, but the delays are rarely long enough to justify such a thing. All the same, a change of cursor would reassure users (and not just me!) that things were indeed happening.
View 2 Replies
View Related
May 4, 2012
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.
View 1 Replies
View Related
Nov 26, 2013
I'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 Related
Nov 18, 2010
I wonder if the CS5 command "Change to global rulers" is scriptable. When I try to record it as an Action script step, it is not recorded and I do not see anything in the JavaScript-ing guide on setting this programatically either.
View 3 Replies
View Related
Jan 23, 2014
Is it possible to change the location of where illustrator looks for scripts, or is it possible to add a location?
View 9 Replies
View Related
Jun 6, 2012
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();
[Code] ........
View 2 Replies
View Related
Jul 19, 2013
I use and action to print, save, save to desktop as PDF(using custom preset), close.New acocunt I am working on requests 2 printouts, but cannot record that in the action. If I can edit my actions. Am inexpereinced with this code but my guess is this is the area:
/event-1 {
/internalName (ai11_print_plugin)
/localizedName [ 5
5072696e74
[Code] .....
Not as important but also looking to change page size to tabloid and scale to fit in action.
View 3 Replies
View Related
Mar 20, 2012
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?
View 7 Replies
View Related