Quantcast
Viewing all 12845 articles
Browse latest View live

Batching In Illustrator??

In PhotoShop CS3, you can select File/Automate/Batch, and run an Action on an entire folder.  I don't see that option in Illustrator CS3?  Is there a way to run an action on an entire folder?

 

I'm attempting to save many EPS images as PNG images, and would really like to retain "vector attributes" - is any of this possible???

 

Thanks for any help.


Resize Artboard

Unsure if Im asking in the right spot but is it possible to automate the resizing of the artboard say from A0 down to A1

Optimize objects stacking order for vinyl cutting

Hello,

i am looking for a script for optimizing vinyl cutting speed.

The script should be similar to following , but needs to sort the selected objects by the relative position to page origin and not the height from page origin as it does now

script from Arranging stacking order from top to bottom

//David Entwistle

 

var thisDoc = activeDocument;

 

// get selected objects

var selObj = thisDoc.selection;

 

// count the selected objects

var selObjCount = selObj.length;

 

// sort selected objects by their height from the page origin

var byProperty = function(prop) {

    return function(a,b) {

        if (typeof a[prop] == "number") {

            return (a[prop] - b[prop]);

        } else {

            return ((a[prop] < b[prop]) ? -1 : ((a[prop] > b[prop]) ? 1 : 0));

        }

    };

};

 

var symbolsSorted = selObj.sort(byProperty("top"));

 

// for each object in turn in the ordered selection, BringToFront

for(i = selObjCount; i >0; i--){

          var currObj = symbolsSorted[i-1];

          currObj.zOrder(ZOrderMethod.BRINGTOFRONT);

}

 

redraw();

alert("Selected Objects Sorted = " + selObjCount);

 

 

Any help is welcome

Panagiotis

Illustrator batch action... slow and even slower after short time

I have around 50.000 qr codes generated through zint, And I made an action witch changes the rgb to cmyk and to 100k black and after that saves them in different folder

 

the thing is... 1) because it is opening them normally with full preview... its kinda slow at this process (around 15 files per minute on ram disk, with 5kb files)

2) after while running this action in batch mode... computer starting lagging and the posses starts to slow down until illustrator or just stop executing the action, or run out of memory !?!

 

besides that, is there any way the action to run in ((background)) without showing the layout?

Anti-aliasing Type Optimized/Art Optimized on PNG export

Hello there,

 

I'm modifying a javascript that makes an export of each layer contained in an Illustrator document and I want to specify the method used for anti-aliasing (either Type Optimized or Art Optimized). Similarly to the option under the "Image size" tab in the "Save for the Web" panel.

 

I didn't find any antiAliasingMethod property in the ExportOptionsPNG24 properties (only an antiAliasing property that accepts boolean). So I wonder if it is actually possible to do it through scripting?

 

Many thanks,

D

SVG-files into one layered AI-file

Hello good guys!

Although I'm new to scripting Illustrator, I'm looking for a script that can help me – and merge 10 SVG-files into one layered AI-file.

 

I get a lot of projects which contents 10 individual SVG-files that are exported from a GIS program (Map data). Each SVG-file contents specific stuff like water, roads, houses etc., so when 'merging' them together, the result will be one final map. I'll need to copy each SVG-file into a new layer so the end result will be a layered AI-file.

 

I was thinking that the script should do something like this:

 

- Find a folder using a dialog box and open its SVG-files (each project has 10 SVG-files (same size))

- Copy the content from each SVG-file into a new document (same size as the SVG-file) on a separate layer

  (The new document will then have 10 layers)

  (Naming each layer the same as the SVG-file name)

- Close all the SVG-files, leaving the new AI-file on the screen

 

I'll would be very glad if someone could point me in the right direction for this project … Thanks

 

- Kenn

Show previous/next layer, hide current

(Sorry if this is too basic a question, I'm not much of a scripter.)

I'm looking for a way to show the previous/next layer (or rather, sublayer) with a quick shortcut. I have a document with many layers in which I have to constantly go through layers and it would be a timesaver. To be more precise, given this sample structure

 

Layer A

|_Layer A1

|_Layer A2

|_Layer A3

|_Layer A4

|_Layer A5

LayerB

|_Layer B1

|_Layer B2

|_Layer B3

|_Layer B4

|_Layer B5

 

And I want to , if I'm in A1, with a command hide A1 and show A2, or if I'm in A4 hide it and show A3.

 

Can someone hlp me to figure out how to achieve this or if there'a anything already made?

Help would be very much appreciated.

how to run my encrypted script

Hi

i encrypted my javascript but i want to run it in illustrator

can anyone know how to make it possible

Thank  you

Appu


How to set title for window at run-time for extension

Hi,

 

I am using the following JavaScript to modify the title for current extension dialog (Modeless dialog):

      var csInterface;

 

      $(function () {

            csInterface = new CSInterface();

            csInterface.addEventListener(Events.Products.ImageBind, init);

      });

 

      function init(event) {

            csInterface.setWindowTitle("Images");

      }

        

I also tried using "new CSInterface().setWindowTitle("Article");" in init() function instead of "csInterface.setWindowTitle("Images");". But title is not modified.

Please guide me on how to modify dialog title.

The manifest.xml file has the following definition for extension:

<Extension Id="com.adobe.illustrator.ImageUI.dialog">

      <DispatchInfo>

        <Resources>

          <MainPath>./html/image.html</MainPath>

          <ScriptPath>./js/main.jsx</ScriptPath>

          <CEFCommandLine/>

        </Resources>

        <Lifecycle>

          <AutoVisible>true</AutoVisible>

          <Visible>true</Visible>

        </Lifecycle>

        <UI>

          <Type>Modeless</Type>

          <Menu>title</Menu>

          <Geometry>

            <Size>

              <Height>400</Height>

              <Width>450</Width>

            </Size>

          </Geometry>

          <Icons/>

        </UI>

      </DispatchInfo>

    </Extension>

 

Thank you

Having trouble with a script selecting elements that are part of an envelope distort.

Hello, first time posting I hope I'm doing this correctly.

 

Basically, I have a file that requires a text change which is then exported and edited in Photoshop. I recently have started experimenting with Envelope Distorts as it offered me better control over the span of my documents text areas, however when I run my script on the document, it fails to catch any text that is wrapped with an Envelope Distort. I'm assuming it's because the script is searching for textFrames and when part of an Envelope Distort text becomes something else.

 

Thanks!

Convert CSV to Swatch Library?

Hi everyone

 

I have a list of 300+ colors that I need to make into a swatch library for Illustrator. The data looks like this:

 

GREEN GRASS,127,187,0

PALE YELLOW,241,235,135

LIGHT YELLOW,238,231,93

DAFFODIL,249,231,21

MOONBEAM,249,223,22

 

etc.

 

It's RGB I think. In any case, I am just starting with Illustrator and I know NOTHING about scripting. Can anyone help me get aaaaalllll these colors into a swatch library, please? I am getting a migraine just thinking about putting them in one by one. LOL

 

I found something here, but that didn't work for me. I get an error on processing on line 75. http://forums.adobe.com/message/2877951

 

Error 24: app.doScript is not a function, Line 75 _> app.dpScript(speakThis, 1095978087); //AppleScript.

 

I get as far as choosing the csv file, and then I get the error. I think this outputs as CMYK, but not sure. Does anyone know of another script, or can anyone help me out?

 

Thanks,

Gina

Calling functions from UI palette

Hello,

From what I understand, you can't call complex functions from a scripted UI palette, only from "dialog" windows (which are usless in my case) because I need the persistance of a palette.

 

I have a series of scripts in use now that are  accessed from the usual "file-scripts folder" within Illustrator itself (about 27 of them).  I want to script a palette window so users can acces them without the usual mouse clicks down the menu system.

 

I'm able to call a simple "Hello World" type function using the "onClick()" method from a button of a scripted palette window, but I cannot use my regular working scripts inside a function that's called from the button.  In X-Code, I was able to write my scripts individually, then just add them to a main floating window via a separate function when they were completed.  But, I'm finding Javascript a little more tricky.

 

If I copy my other's script code into the function in the palette window script, it runs, but it runs before I click the button! --  After in runs, then the palette window is displayed(?).  If I try to use the execute() method with "onClick", the script just opens in the SDK, it will not and does run in Illustrator.

 

I take both of these as clear indications that I have no clue what I'm doing (or that I'm trying to do the impossible).

 

I did find someone with a similar problem, but they were scripting After Effects and were offered this solution:

 

system.callSystem ('afterfx -r "/C/Program Files/Adobe/Adobe After Effects CS3/Support Files/Scripts/GlobalVars.jsx"');

 

 

Is there anything I can do in Illustrator that will allow me to call (or execute) my other scripts/functions and have them execute within Illustrator?

 

Thanks for any and all help!

Exporting to JPEG in CMYK not working (javascript)

Hi all,

 

I'm having a lot of trouble with an .AI script I'm making to export several versions of a file depending on it's color model.

 

The only thing holding me up is that I can't seem to set the color space to CMYK when exporting to JPEG, even though it is possible when choosing File / Export / Export as JPEG (jpg).

 

Here is my function

 

  1. // Exports a JPG 
  2. function exportJPG (filename, resolution, colorspace) { 
  3.  
  4.  
  5.   var options = new ExportOptionsJPEG(); 
  6.   options.antiAliasing = true
  7.   options.artBoardClipping = true
  8.   options.qualitySetting = 100
  9.   options.horizontalScale = (resolution / 72 * 100); 
  10.   options.verticalScale = (resolution / 72 * 100); 
  11.  
  12.  
  13.   if(colorspace === 'cmyk') { 
  14.     $.writeln('color space for JPG is ' + options.imageColorSpace); 
  15.     options.imageColorSpace = ImageColorSpace.CMYK; 
  16.     $.writeln('color space for JPG is now ' + options.imageColorSpace); 
  17.   } 
  18.  
  19.  
  20.   app.activeDocument.exportFile( new File(filename), ExportType.JPEG, options); 

I've got the writeln in there to try to debug, when I run it I get this in the console:

 

color model for JPG is undefined

color space for JPG is now ImageColorSpace.CMYK

 

and I get an RGB jpg.

 

Can anyone help? The scripting reference PDF is really lacking and it doesn't list this property, but it must exist. It would be bizarre if they made the export in scripting more limited than the file menu.

Batching In Illustrator??

In PhotoShop CS3, you can select File/Automate/Batch, and run an Action on an entire folder.  I don't see that option in Illustrator CS3?  Is there a way to run an action on an entire folder?

 

I'm attempting to save many EPS images as PNG images, and would really like to retain "vector attributes" - is any of this possible???

 

Thanks for any help.

Optimize objects stacking order for vinyl cutting

Hello,

i am looking for a script for optimizing vinyl cutting speed.

The script should be similar to following , but needs to sort the selected objects by the relative position to page origin and not the height from page origin as it does now

script from Arranging stacking order from top to bottom

//David Entwistle

 

var thisDoc = activeDocument;

 

// get selected objects

var selObj = thisDoc.selection;

 

// count the selected objects

var selObjCount = selObj.length;

 

// sort selected objects by their height from the page origin

var byProperty = function(prop) {

    return function(a,b) {

        if (typeof a[prop] == "number") {

            return (a[prop] - b[prop]);

        } else {

            return ((a[prop] < b[prop]) ? -1 : ((a[prop] > b[prop]) ? 1 : 0));

        }

    };

};

 

var symbolsSorted = selObj.sort(byProperty("top"));

 

// for each object in turn in the ordered selection, BringToFront

for(i = selObjCount; i >0; i--){

          var currObj = symbolsSorted[i-1];

          currObj.zOrder(ZOrderMethod.BRINGTOFRONT);

}

 

redraw();

alert("Selected Objects Sorted = " + selObjCount);

 

 

Any help is welcome

Panagiotis


Script for Proofing Template

Was wondering if it would be possible to create a Script that would take a Selection or image and re-size it proportionally into an 11"w x 8.5" H document and place it Centered in a 10.5" x 6" box located at the top of the page. If possible if it can detect the size as being less than 10.5" x 6" then don't scale, but if larger scale down to fit Proportionately.... Then Provide a dialog box that would let me enter my job # and today's date in a pre-determined location. I've attached a sample of what I'm trying to accomplish for the finished look. I'm also Assuming the base elements will need to reference a file (or template) that would contain the proofing information if so we'll call it "Proof_Temp.ai"

 

Huge thanks in advance for anyone that can assist...

 

Image may be NSFW.
Clik here to view.
Proof Sample.jpg

move textFrame to specific layer

So I am wanting to search through the entire document for all text frames that contain an underscore. If the text frame does include an underscore I am wanting to move that text frame to a specific layer called "Hypertext". Then I want to remove the underscore from that text frame. So in my code below I have it doing everything I have mentioned except I don't know how to get it to move to a specific layer. Any help would be appreciated!

 

#target illustrator
var doc = app.activeDocument;
var allText = doc.textFrames;


var searchString = /_/g;
var replaceString = " ";


for (var i = 0; i < allText.length; i++) {    var thisTextFrame = allText[i];    var newString = thisTextFrame.contents.replace(searchString, replaceString);    if (newString != thisTextFrame.contents) {        //alert("Contains an underscore");        allText[i].move("Hypertext");        thisTextFrame.contents = newString;    }
}

Trouble applying paragraph and character styles to text in Illustrator with a script

0down votefavorite

 

 

I am trying to figure out how to apply paragraph and character styles to text in Illustrator with a script. I have pieced together this and it works sort-of. But I run into the problem that if searchWord1 = "CAUTION:"; with the colon it doesn't work. The same goes for searchWord1 = "¡CUIDADO!:"; I'm assuming it is because of the punctuation? How do I fix this?

var doc = app.activeDocument; var myFrame = doc.textFrames.getByName("back-info"); var myStyle = doc.paragraphStyles.getByName("bullets"); myStyle.applyTo(myFrame.textRange);

if ( app.documents.length > 0 && app.activeDocument.textFrames.length > 0 ) {

searchWord1 = "CAUTION";

for ( i = 0; i < app.activeDocument.textFrames.length; i++ ) { textArt = activeDocument.textFrames[i]; for ( j = 0; j < textArt.words.length; j++) { word = textArt.words[j]; if ( word.contents == searchWord1) { var boldstyle = doc.characterStyles["bold"]; boldstyle.applyTo(word);
} } } }

Pg Number, File path and date automatically printed?

Is there a way to automatically print the page number, complete file path and date at bottom of each  page (set to landscape)?

 

Thanks!

Transform Each

Viewing all 12845 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>