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


ADVERTISEMENT

Illustrator Scripting :: Passing Variable Via BridgeTalk

Jan 9, 2013

I now understand about serializing the message, and loading and running external scripts via opening, reading, and sending them within the context of BridgeTalk. 

I have a palette window which contains a listbox of items that searches and lists the contents of over 400 products. This pic of the template below is typical for all items.  The imprint area shown will change depending on the product.
 
Script #1:
When the user selects a product from the list, that selection is used to open a file (illustrator template) for that item that shows a guide path box  with height and width information for the imprint area on the product.  The currently opened illustrator document contains the artwork they are working on at the time.  This artwork is copied and pasted to the newly opened template file.
 
Script #2:
This script contains  an array of all the products in the palette list.  Within each index of that array, each item will contain the following information:
 
Example (the name property of each item will match the name of the index box selection from script #1):
 
var itemArray = new Array();
//p may be saved at index 0 of itemArray
var p = new Object();
        p.name ="P- Shape P";
        p.width = 189;
        p.height = 103.5;
        p.pos = [300,564];
 
I need to send the selection from script #1 to script #2 so I can loop through the array and find a match, at which point the information stored in the properties of the item will be used to scale the art and place it in the correct position on the template.  Is there any way to send a variable from script #1 containing the name of the selection via BridgeTalk and have it stored in a variable in script #2?  If not, I read somewhere where it might be possible to write/save it to disk and have the second script read it. 

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

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 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 :: 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

Illustrator Scripting :: How To Save DXF As AI File Using VBScript

Oct 9, 2013

I have a VBA script that opens a .DXF file in Illustrator, and want to save it as an AI file. How do I do this?

View 14 Replies View Related

Illustrator Scripting :: Parse CSV File And Output XML For It

Dec 18, 2012

im trying to parse a CSV file and output XML for Illustrator;

[URL]
 
here is a sample file That works,
 
[URL]
 
 
Im trying to turn this
 
[URL]
 
into something that works in Illustrator

View 1 Replies View Related

Illustrator Scripting :: Importing Text From TXT File?

Oct 17, 2013

I'm looking for a way to import text from a .txt file but I'm totally lost.

View 2 Replies View Related

Illustrator Scripting :: Save A File That Is Already Open In Same Directory With Different Name

Nov 7, 2013

I'm trying to create a script to save a file that is already open in the same directory with a different name.
 
Example: nome_0000_art to nome_0000_closed
 
I tried to create from another script that saves EPS but as I am new to the subject could not make it work
 
how do I perform the command saveas automatically without showing the dialog window by changing the file name?

View 7 Replies View Related

Illustrator Scripting :: Filling Forms From A File CSV / EXCEL?

Nov 12, 2013

I have a form I have to fill out every day several times according to the client, but this information comes from a spreadsheet.

View 8 Replies View Related

Illustrator Scripting :: Execute JSX File By Using Mac Terminal Command

Aug 6, 2012

I want to execute a .JSX file by using Mac Terminal Command like i am doing in MS Windows by using following cmmand: C:/ start illustrator.exe Script.jsx
 
its working fine but i want to do the same thing in MAC, i am working on an Application in that I am using CS6 SDK to add some functionality in my Adobe Illustrator, but didnt find any method to execute JSX files directoly from VC++/CS6 SDK.

View 6 Replies View Related

Illustrator Scripting :: Trigger A Script When File Is Opened?

Jun 6, 2012

I have a simple script that I need to run when a file is opened in illustrator(cs5) on windows 7. I tried adding the script to the "startup scripts" folder but that only executes when a new instance of illustrator is started. If illustrator is already open and I go to "file/open", the script doesn't run.

View 6 Replies View Related

Illustrator Scripting :: How To Read Text File Into TextFrame

Feb 23, 2012

I'm trying to read a text file into a textFrame.  It reads in but is not including linefeeds so it's just one big long line of text.  I'm using the following code to read the file.  I attempted to insert a character after each readln() but that didn't work.  I also tried creating a variable that the readln() was stuffed into before setting the textFrame.contents to the variable, but that didn't work either. I'm stumped.
 
while (! notesDoc.eof) {
noteTextRef.contents += notesDoc.readln();}

View 2 Replies View Related

Illustrator Scripting :: Dynamic Save File Path

Jan 14, 2014

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
 
[Code] ......

View 1 Replies View Related

Illustrator Scripting :: Save File On Remote Location

Oct 8, 2012

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)

View 7 Replies View Related

Illustrator Scripting :: File Without Opening Dialog Window

Dec 2, 2013

How do I open a file on Mac without dialog window using a pre-defined path network? example: myfile / mytest / mytestfile.ai.

View 4 Replies View Related

Illustrator Scripting :: Convert AI File Into JPEG Using Script (JSX)

Jul 12, 2012

I want to convert a AI file into a JPEG by using JSX(java script). I am able to change its file type but having some problem with resizing.

View 3 Replies View Related

Illustrator Scripting :: Export JPG A Series Of Images From AI File

Dec 13, 2012

I'm using a Javascript that will export as JPG a series of images from an AI file (that part is working fine), then rename them (that part isn't working). Writing and troubleshooting with Extendscript.
 
Trying to eliminate as many possible places to go wrong, I came up with the following:
 
myfile = new File; myfile = myfile.openDlg();
var newName = "NEW.ai";
myfile.rename(newName);
 
When run targeting Illustrator, it does nothing.

When run targeting ExtendScript, for some reason this blasts the file into oblivion, never to be found again.

View 3 Replies View Related

Illustrator Scripting :: Returning The Status Of Linked File

May 20, 2013

I´m having this problem:
 
I created and array to receive linked filed (let´s say var pItem = app.activeDocument.placedItems;)
 
After it, I used a loop to know the File each link is associated. So:
 
for (var g=0; g<pItem.length;g++){
   var src = pItem.file >>>>>>>>>>>>>>>>>>> The problem is here. If we have a missing link in the document, the script will stop with the message.
      ... continue procedure     
};
  
Of Course, I could try using an "try" statement...but..Just to know: Is there any way to evaluate the status of a placedItem (to know if it´s missing or not)?? In the user manual I did not find any property that checks for this. We have properties to check for bounds, matrix, notes, tags, if it´s locked, visible...but not for checking the consistency of a placedItem, right?

View 2 Replies View Related

Illustrator Scripting :: Split File Into Multiple Files

Nov 4, 2013

Is it possible to have a script that would split up an Illustrator file that contains a number of groups of elements into individual files... for example, here is a download link for a file that has different types of moustaches and I want each moustache as an individual file... I have hundreds of Illustrator files like this that have 4, 8, 15, 20 or more illustrations all bunched onto the one file that I need to split up. I'm using CS4 [URL].... 

View 3 Replies View Related

Illustrator Scripting :: Recursive Loop Through File System

Apr 20, 2012

I'm trying to figure out if Javascript is my answer to my problem.  I've been able to re-write all my Applescripts that manipulate Illustrator except for the ones the need to use the file system.  We have switched to PC's at work and now I'm forced to figure this out.  Our art files are saved with a 7-digit number, followed by the name of the art in the file.  Ex:  1000049-Bob's Garage.  My applescript had a recursive loop that worked it's way down through the file structure on our art server until it found the lowest folder to which it belonged, then saved itself there.  Here's an example of how the server file structure (these are folder names) is layed out:
 
1000000-1004999
1005000-1005999
1010000-1014999
 
and so on.
 
The script would load all the foldernames in the first tier of the directory, loop through them and look at the first and last name of each these folder names, then compare the Illustrator filename to them.  If my file was between the two, then the loop called itself, loaded the folders inside that folder, and by doing so, worked it's way down through the folders, through the tree structure until there where no more folders.  At that point, the file was saved, in order, where it should be.

View 7 Replies View Related

Illustrator Scripting :: Any Way To Convert Recorded Actions Into JSX Javascript File?

Mar 15, 2014

For photoshop, there's URL... (scroll down to "ActionFileToJavascript") which can convert recorded photoshop actions into jsx. Is there any such resource for Illustrator?

View 8 Replies View Related

Illustrator Scripting :: Read Input Parameters From Script File Name

Aug 24, 2013

How do I read input parameters from a script file name? For example, let’s say I want to run a script that requires 3 variables as input, but rather than prompting for the values I wish to read them from the script file name … e.g., the file name might be “Myscript.js (my_variable1, my_variable2, my_variable2)” … where variables are all real numbers. So I assume the script name when run should look something like …  Myscript.js (10, 10, 100), but how do I then read these and assign these values to a var statement within the script?

View 3 Replies View Related

Illustrator Scripting :: Open Exported File Directly In Photoshop

Sep 18, 2013

var doc = app.activeDocument;
var destFolder = Folder ("~/Documents");
 
if (destFolder) {
var fileName = activeDocument.name;
var destFile = new File(destFolder + '/' + fileName);   

[Code] .....

This code I created exports my current Ai document as a PSD with set options. It also names the new file what it is called in Ai.

How can I call the created file and open it directly in Photoshop? Keep in mind I would be working on multiple files, so file names would change every time I ran this Export Script.

I could call a specifically named file and open that, but that's not what I need this script to do. I just need it to open the newly created PSD file.

View 2 Replies View Related







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