Illustrator Scripting :: Load Default / Preset Values From External File?

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


ADVERTISEMENT

Illustrator Scripting :: Open Save File Dialog With Default Path

Oct 8, 2012

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.

View 2 Replies View Related

Illustrator :: Impossible To Load PDF Preset Rich Content PDF

May 5, 2008

The loading of the preset "Rich Content PDF" failed.I Choose Edit > Adobe PDF Presets. I Click Import, and I select the "Rich Content PDF.joboptions" file.

But I have an error message (Impossible to copy the PDF preset).

View 1 Replies View Related

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 View Related

Illustrator Scripting :: Convert RGB Value To CMYK Values

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

Photoshop :: Load Image Either JPEG / PSD File And Make Layer Copy - Unable To Apply Preset Action

Jul 16, 2012

When I load an image either a jpeg or psd file then make a layer copy I am unable to apply a preset action to this. Either a default action or one of my own on a Mac OSX running Lion. This did not present a problem in CS5 and I am wondering if I've missed something basic?

View 10 Replies View Related

Illustrator Scripting :: Find And Replace Script With Values Via Excel

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

Illustrator Scripting :: Assign Values To Artboard And Save Within Document?

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

Illustrator Scripting :: Convert Decimal Values To Fractions For Use In Inch Measurements?

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

Illustrator :: Default Increment For X And Y Values In Control Panel?

May 17, 2012

Is there a way to change the default increment for the X and Y value boxes in the Transform area of the Control panel? When I have an object selected and want to move the object by clicking the arrows beside the X and Y boxes the object moves 1/8 inch for each click. Is there a way to set that to 1/16 inch for example?
 
A screen grab is attached showing the area on the Control panel in question. I've checked all the Preferences settings I can find but haven't found this one yet.

View 9 Replies View Related

Illustrator Scripting :: Read External Data / XML Or TXT And Create Files Automatically

Feb 3, 2014

Automated AI so much so that it can read instructions from an external source like xml or txt and automatically creates files and folders.
 
For example we have something like this:
File1
Hello
Font: Myriad
Size: 22
Colour: Pantone 254C
Image 1.jpg (link)
Source: Image1.png (link) clipart1.eps (link)
----------
File2
 
and so on.
 
I want AI CS5 to:
1. create an eps File1, create a folder named File1, put File1.eps in it
2. type the text Hello, apply Myriad 22pt and PMS 254 to it, centre it to the artboard
3. Place all jpegs, pngs, eps source files on the artboard and embed them.
4. Save the file as eps legacy version 10, close the file and move to the next file.

View 1 Replies View Related

Illustrator :: How To Change Scratch Disc From Default System To External Drive

Jan 23, 2014

using mac os I need to change my scratch disc from the default "system" to an external drive.

In preferences> scratch discs it sees the hard drive i have attached...so i  choose it, I click ok and get the usual warning about having to restart illustator to implement the change. problem is, when i quit, then restart illustrator, no dice. it's defaulted back to " system". I change it again. click ok. then, just to see, i re- open the preference panel. it's already gone back to " system". what gives? i've tried over and over and it just wont take.

View 6 Replies View Related

Illustrator Scripting :: Choose Folder Default Location

Oct 5, 2012

Any way to allow a user to choose a folder from a default location. I thought I had found the solution but it's not quite working as I wanted:
 
#target illustrator

//Example 1
var output_folder = Folder.selectDialog ('Choose PDF output folder.');

//Example 2
var myFolder=Folder(app.activeDocument.path).selectDlg("Choose PDF output folder:");
 
If I use the code in example 1 the choose folder dialog appears and the 'Open' button is available and when I press the button the location is chosen as expected. However if I use the code in example 2, although the choose window opens in the path of the active documents location the 'Open' button is not able to be pressed until I select a folder., which means that the chosen location is not correct. I should indicate that I'm running this code on a Mac.
 
Any way to have a choose folder dialog window specify a location and be able to select that.

View 20 Replies View Related

Illustrator Scripting :: Assign Default Colors To New Layer?

Aug 7, 2013

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 Related

Photoshop :: Can't Load Preset From Levels

Jan 2, 2013

Ever since upgrading to CS6, when I click Levels>Load preset, I can no longer search in the window for the file. Previously, I could type in the file name and it would come up and I would select it. Now, when I search for the file name, there are no results at all. The file can be found by doing a regular search in a Finder window, but not through the window that comes up from the Levels window. I've reindexed Spotlight, and that has had no effect. The workaround is to open a Finder window, search, find the file, drag the file into the Levels' load window and select it there.

View 4 Replies View Related

Illustrator :: Save Copy Of Open AI File As PDF With Personal Preset

Aug 17, 2012

I am currently working on the schematics of a quite big document and I am using Illustrator. I work on the .ai version of the figures but I want to save them in a very quick way as pdf files with personal setting (super compression, no preview...). What I am doing now is that I have my .ai file open, and when I want to save a pdf version of it I go to "File" then "Save a copy" then "Type: pdf" and I enter a name, I click on "Save" and a window pops up with some options. Here, I select a personal preset and then click on "Save pdf" and I am happy with the final saved pdf.

The thing is that it is a quite long process when you have to do it several times per figure. I tried to automatized it through a script (or action) but the available options are quite limited (it is hard to make Illustrator understand that if the current file is myfig.ai, I want a myfig.pdf and that I want to save it in the working folder). Under "File", I also tried the "SaveDocsAsPdf" script but once again, I have to select the folder where I want to save the figure and so on. Maybe I missed something. Any efficient way to save my figures as pdf by clicking a the F9 key (for instance).

View 1 Replies View Related

Lightroom :: Resolution Values For External Editing?

Apr 22, 2012

In the Preferences - External Editing options the resolutions are set as 240 for CS5 and Additional Editor, should I leave these at 240 or change them, and if I change them, change them to what value for best quality?

View 2 Replies View Related

Illustrator Scripting :: Adding File Name And File Full Path To A Page

Mar 28, 2012

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.

View 2 Replies View Related

AutoCAD VB :: Extract Attribute Values From Block In External Reference?

Mar 23, 2013

is it possible to extract attribute values from an block in an External Reference using VBA ?

View 5 Replies View Related

Illustrator Scripting :: How To Convert EPS File To SVG

Sep 11, 2012

I added CS6 COM reference in my VB.NET application and after that I have the following basic object creation in order to convert a eps file to svg. But for some reason when I create this COM object it is launching the Adobe Illustrator application. Why it is doing like this? It’s a simple COM object why it is interacting with Illustrator Editor?

View 9 Replies View Related

Illustrator Scripting :: Symbol To Be Placed In EPS File?

May 21, 2013

I need to place a logo at the bottom of the image in eps.
 
i have created the logo as symbol, can this symbol could be placed at the bottom of the image.

View 3 Replies View Related

Illustrator Scripting :: Export File To JPG

Apr 1, 2013

I need to export an AI file to JPG.
 
For that I am using the File->Export option of Adobe Illustrator.

Now I want to do the same by using JSX Script.
 
I need Four JPG images of different sizes (70,150, 300,900) .
 
What Resolution (DPI) should I use to get images of above mentioned sizes.. or how can i dynamically set the DPI while exporting AI to JPEG image file

View 3 Replies View Related

Illustrator Scripting :: Convert EPS File To JPG Or PDF

Jan 15, 2009

I'm using Adobe to deal with .eps files.

My problem is to display graphic arts in "read only mode". That means when I'm done developing graphics in my .eps file, I want to display this graphics to other user without giving him option to edit it or delete it.

I'm trying to accomplish this true Visual Studio 2005, C# .net

View 6 Replies View Related

Illustrator :: How To Place Text From External File As Updatable Link

Apr 15, 2013

Currently we create presentation documents InDesign. Each presentation page is a linked Illustrator file (the file contains drawings and description texts). We write the text in Illustrator instead of over it in InDesign because multiple designers/writers will work on each page. We have text that sometimes appear on multiple pages, this text has previously been copied and pasted into each Illustrator file that it needs to appear in, this is inefficient and prone to error.

Is there a way to link to a text file in Illustrator that remains updatable? I poked around here and found information relating to Variable Data – things similar to Data Merge in InDesign. This isn't the solution I'm looking for however. It seems like a plugin or script is the solution.

View 3 Replies View Related

Lightroom :: 5 - Use Preset And Plugin Folders In Location Other Than Default One Possible?

Nov 13, 2013

Is it possible to use LR5's Preset and Plugin folders in a location other than in the default ones? I'd like my live Prest and Plugin folders to be in a Dropbox folder so that they would be synced in the cloud but the folders would also be synced between my desktop and my laptop so that I would have a consistent work environment wether I was using my laptop when travelling or my desktop.

View 1 Replies View Related

Illustrator Scripting :: Can Create Layers With CSV File?

May 9, 2013

Is there a script that can create layers with csv file?

View 5 Replies View Related

Illustrator Scripting :: Open File Without Warnings?

Aug 22, 2012

When I open a PDF file I get the following warning:
 
The document contains PDF objects that have been reinterpreted.

- The font is missing
 
Can I somehow open the file without showing that error, or simply automate and click OK on that window? I am using C# with COM reference. See code below:
  
var iapp = new Illustrator.Application();
var idoc = iapp.Open(file, Illustrator.AiDocumentColorSpace.aiDocumentRGBColor, null);

View 2 Replies View Related

Illustrator Scripting :: Get Source Path Of AI File?

Sep 7, 2012

Have searched but i cant find a good way of retrieving the source path of the current .AI file. Is it possible?
 
IE: If i am working with a file in C:adobeIllustratoreautifulfile.ai i want a function that retrieve C:adobeIllustrator 
// Clint

View 6 Replies View Related

Illustrator Scripting :: Reading A File Containing BridgeTalk

Feb 6, 2013

I have a scriptUI generated palette which contains 26 icons linked to their respective scripts.  When an icon is pressed, it invokes the required script via this:
 
searchPanel.children[0].onClick = function(){
searchOne.open("r");     
var bt = new BridgeTalk;

[Code].....
 
My other scripts have "normal" functions that don't cause any problems, so I'm assuming it has something with BridgeTalk being loaded inside the palette function (since the code that's read in from the file is inserted at the location from where it's called). 

View 8 Replies View Related

Illustrator Scripting :: Placing A Text File Into CC

Jul 6, 2013

how to place an image into illustrator via scripting with javascript, however I am having difficulties with text files. My code is:
 
var myDoc = app.activeDocument;
var Layer1 = myDoc.layers[0];
function getTextFile() {
    return File.openDialog('Please select the text file to be imported:', undefined, undefined);
}
var myTextfile = getTextFile();
var myPlacedFile = Layer1.placedItems.add();
myPlacedFile.file = myTextfile;
 
But when I select a text file, it says it is an unsupported format. I'm assuming it has something to do with the extra options that come with importing a text document, specific for .txt and .doc for example.
 
For what it's worth I was working on an alternate method by read() ing in the contents of the .txt file and setting them equal to the contents of a textFrame, however it imported the text without carriage returns/newlines and I haven't been able to result that issue.

View 3 Replies View Related

Illustrator Scripting :: How To Convert File To JPEG

Oct 22, 2012

I am using following code to convert AI file to JPEG
 
exportFileToJPEG('~/Desktop/Harsh/1.jpg');
 
function exportFileToJPEG (dest) {
if ( app.documents.length > 0 ) {
var exportOptions = new ExportOptionsJPEG();
var type = ExportType.JPEG;
var fileSpec = new File(dest);

[Code]...
 
but ir crope the document to the size of the image and resize the ArtBoard to the size of Image.
 
I want to convert the Existing ArtBoard Area only , i dont want to crope the image.

View 1 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved