So I deal with a lot of files each day that need to be saved according to their lead code, meaning that there is a folder that holds thousands of sub folders that have the same name as this lead code on a server.
So since I have the lead code in the file name I'm trying to use that in conjunction with the file path to tell illustrator where to save it with Javascript. Also the idea of a dynamic save path is useful.
Here's what I've got so far, it's not working yet but I feel like I'm close.
/*/////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
Dynamic Save Path////////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////*/
#target illustrator
I want to open a "Save File Dialog " with some default path.Like when user run that script I want to open a "Save As" dialog box with default path "/Volumes/<shared name>/<folder name>/.. ."I am using File.SaveDialog(prompt, filter);
but it doesn't open to the location by default that I want to open.
I'm new to scripting What I want to do and don't know how to go about it is to run a script that collects the saved file name and the full path where the file is saved on the network and displays it on my document.
When I open the .AI I noticed that the reference to the visuals is under a %DocumentFiles section: %%DocumentFiles:/Volumes/Storage/Projects/Client/AAA001/visuals/retouc hed.psd %%+/Volumes/Storage/Projects/Client/AAA001/visuals/flattened.jpg
I need to replace "/Volumes/Storage/Projects" with "/Volumes/Projects". (There are some more complex replacements I need, but let's start here.)
Is there a way with JavaScript to place an image with a calculated path and file name? I have 30+ artboards per document, each artboard named by product number. The actual file name of the master AI file is also already established (meaning every document I use this new script on will have already been saved).
Here's the scenario I'm hoping to create in the context of the documents mentioned above:
Run a script to "Place" a linked image based on the following calculated path:
["S:SAPCurrent Images in SAPStock Schools"] + [current ai filename minus the .ai extension]+[a hyphen like this "-"]+[currently selected artboard name]+[".jpg"]
This image link can be placed on a new top layer called "Images" or if necessary on the currently selected layer. Dimensions of the placed image should be a pre-determined size 8"x8".
I want to save Current open Document on remote location (on server).
I am able to save it on my local machine(the machine i am presently working on).
Now I want to save it on some remote server.
I am using following code for that:
var doc=app.activeDocument(); var aiSaveOptions1=new IllustratorSaveOptions(); var aiFile1 = File( '/osn-pc-16/adobe/1/Original.ai' ); doc.saveAs(aiFile1,aiSaveOptions1)
I created a circle and positioned a line segment on top of it. When I preview or save the image, the line segment doesn't appear. Here is an illustration of the problem.
I have a collection of circles and rectangles in my document. Is there any way to sort out circles from rectagles using JavaScript? Say i want to make my circles red and the rectangles blue.
Is there any way to find a specific point on a path, that is not necessarily an anchor point?
What I'd like to be able to do is tell Illustrator "Give me the coordinates of the point that's exactly at half of this path's length" or "... exactly 25% ...". And if that's possible, can I somehow add an anchor point to that point, or cut the path at that point?
Is there a way or a script that will make all the text on a page Dynamic? At the moment we have to select each text box and press 'make text dynamic', which can get tiresome with a lot of text boxes. If we select all the text boxes and do the same we get a lot of variables with the same name which gives an error.
So we need a script that can make it all dynamic with different named variables.
All I am trying to do is move an anchor from one location to another using vbscript. I have searched everywhere and scoured the scripting references but I have not been able to figure this out as of yet.
I am able to select anchor points without an issue....moving those points seems to be a problem.
I need an Illustrator script for distribute a collection of diferent symbols along a path. The symbols should be distributed from the beginning to end of path and separated a proportional space each other. Additionally each symbol should be rotated pointing to a "look at" object.
Please look at the attached image for further info.
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.
I have a very simple javascript for Illustrator that is intended to render all filled objects semi-transparent. It works nicely but for large documents with many objects this takes ages, even beyond the time it would take to do it manually.
I'm wondering if there is any way to improve this script so it works in a reasonable time for large files? I'm running Illustrator CS5 on a Windows 7 64-bit Intel Quadcore i5-2400 @ 3.10 GHz System with 12 GB of RAM and an AMD Radeon HD 6350 graphics. Would upgrading to CS6 significantly improve the speed? CPU load is only at 25%, but I guess javascript cannot be run in multiple threads with the Illustrator engine? Is there another scripting language that would allow me faster processing of that task in illustrator or is my code just poorly optimized?
with (app.activeDocument) { if (pathItems.length > 0) { for (var g = 0 ; g < pathItems.length; g++) { if (pathItems[g].filled == true) { pathItems[g].opacity = 50; } } } }
The first loop grabs the geometries drawn in the current document and rotates it around itself creating duplicates. The second loop is supposed to circumvent more geometries around the newly created geometries.
But instead of creating a radiant pattern, this code builds a tower: for the second loop everytime it grabs the last drawn geometry instead of what is in the "Original"
for NumPaths = 1 to frontDocument.PathItems.count set myPath = frontDocument.PathItems.item(NumPaths) For index = 0 To 30 set newPath = myPath.Duplicate call newPath.translate(100*sin(6.14* index/30),100*cos(6.14* index/30))
I'm working on a script for my company that sets up templates for internal use. I've been able to get most of it completed by drawing basic pathItems and textFrames. The problem I face now is adding our company logo. In the scripting reference I've found examples of duplicating art from one document to another, but that isn't what I need here.
I've approached this by trying to select our company logo in an existing document and in some way capturing the pathPoints so I can use them in the the script that is setting up the templates.However I've not had much luck with this. Ideally everything will be self contained in the one script, so that external files aren't required.
how the Photoshop DOM works with this snippet but I can't get it to select a pathItem correctly. When testing in ESTK I sometime have to run a line to that sets the path Item selected property to true several times before the path is selected in the GUI.Here is the script I am working on.
copyPathsToPhotoshop() function copyPathsToPhotoshop(){ var currentLayer = app.activeDocument.activeLayer; var count = currentLayer.pathItems.length; var shapeNumber = 105 for( var p=1;p<count;p++){ [code]....
How do I set a folder as a relative path to where the script is running?
is there any easy way like in unix, starting without / ?or for example
"~/Desktop/"
"/users/<login>/desktop/"
seems that path to me is the only way...
is there an easy way to change posix paths to applescript??
I have this code:
tell application "Finder" to set templateFile to (container of (path to me) as string) & "Graficas FINAL ADQAT.ai"
with this error: error "No se ha encontrado el archivo Macintosh HD:Users:Vibra:Desktop:Graficas FINAL ADQAT.ai." number -43 from "Macintosh HD:Users:Vibra:Desktop:Graficas FINAL ADQAT.ai"
the file is there how I change the filepath to be compatible with applescript?
I'm trying to set up a script that will grab a group of objects and turn them into a compound path, then apply a clipping mask to the compound path and the next group in the layer.
I'm working on a scrpit for Illustrator which generates cycloidal curves (hypocycloid, epicycloid, rhodonea) and would like to explore my options for creating a blur across the path. The generated images will be saved as a PNG and then used in another program for an optical research application. So far, I have learned that it is not possible to access any of the effects through javascript. I also looked into applying a graphic style (as found in several other posts), however I need to have control over the amount of blur applied.
As an alternative, I've been working with applying a radial gradient across the path (whcih is possible using javascript). This achieves an effect which is 'close enough' however. Here is an image of the result generated using a 'rhodonea' curve:
My issue is: How do I blend the path at the intersections to get something like this (generated with the 'gaussian blur' effect):
I'm using Illustrator CS 6 / ExtendScript Toolkit CS 6.
Is there any way to add arrowheads to a path with script (JavaScript or VBScript)? I don't want to make triangle or V-shaped path but add one of the built-in start and end arrowheads, scale them and set arrowhead alignment, all with script. There is no information about this topic in the Illustrator scripting references.
I have created a path with multiple strokes, which differ in weight and color. I can save that as a profile but it's really tedious if I want to alter the different colors and stroke weights.
I can't seem to do record an action which will automatically alter those parameters (f.ex. raise each strokeweight by 10pt.). All I get is just an action that will recreate the altered state during recording (f.ex. stroke weights 20, 10 >--Action--> 15, 5). I cannot start the action and raise or lower my stroke weights at once based on the current parameters.
I've devised this script that "kind of" works.This script takes your selection, copies appearance attributes, and pastes them to the top object after clipping.It's currently limited in a few ways:
• It does not accept compound paths as clipping object (and I don't know how to test for it, nor how to iterate down said compound clipping object to set each path object to clipping separately) • It only works with a single stroke or fill • It does not understand "no fill" it will fill your object with white instead *FIXED* • I'm hoping to use the "graphicStyle" property to copy the appearance, since that sounds way cleaner. But I don't understand how to.
Even with these limitations, I bound this to CMD+7 using fastscripts - I'm *already* used to it working this way!
#target Illustrator // script.name = Clip Retaining Color.jsx; // script.required = at least two paths selected, top most path is the clipping mask; // script.parent = Herman van Boeijen, www.nimbling.com // 30/11/13; // *** LIMITED TO A SINGLE STROKE AND/OR FILL OF THE CLIPPING OBJECT*** // Here's hoping to use the "graphicStyles" property to copy over the appearance. [code]....
Is it possible to script the menu item Object/Path/Outline Stroke?I need to cycle through all the Path items in the document and convert them to Outlines.