Script to Perform Live Trace then in Illustrator Run Action... Please Help

Hello Everyone, I am brand new to scripting and need some help... I would like to create an inter-application javascript (.jsx) file that will perform the following steps in sequence:
1) Target Bridge CS3 and:
a) Automatically select files (thumbnails) (the names of, and path to these files never change so scripting them is no problem). Path & Files are: C:\files\1.psd, C:\files\2.psd and C:\files\3.psd.
b) Run Tools > Illustrator > Live Trace [Live Trace Dialogue Box Settings (Tracing Preset: Color 16, Save & Close Results (checked), Document Profile: "Basic RGB", Width: "576", Height: "720", Units: Pixels, Destination: "C:\files\, File Naming: Document Name + .ai)].
After Live Trace finishes, C:\files\1.ai, C:\files\2.ai and C:\files\3.ai are created.
and then....
2) Target Illustrator CS3 and:
Run my Illustrator precreated Action: "Add Border". This action adds a precreated border to the files. The action is coded with the paths and file names of the .ai files as well as saving instructions.
To summarize:
1) In Bridge, run Live Trace on precreated .psd files
2) In Illustrator run an action on the files that were live traced
That's it. It seems straight forward when I write it out but trying to figure out how to script it is boggling my mind.
Thank you for your help!

I will go check that error meantime try this… The Photoshop export looks OK to me but I have no idea about SVG files as I don't use them… This should be getting closer… You will need to make the same 2 typo changes…
#target illustrator
while (app.documents.length) {
  app.activeDocument.close(SaveOptions.PROMPTTOSAVECHANGES);
var traceFolder = new Folder ('~/Desktop/Live Trace/');
var fileList = traceFolder.getFiles(/\.psd$/i);
if (fileList.length > 0) {
     var svg = new Folder(traceFolder.fsName+'/SVG Files');
     if (!svg.exists) svg.create();
     var psd = new Folder(traceFolder.fsName+'/PSD Files');
     if (!psd.exists) psd.create();
     var ai = new Folder(traceFolder.fsName+'/AI Files');
     if (!ai.exists) ai.create();
     main(fileList);
} else {
     alert('This Folder contained NO Photoshop PSD files!');
function main(fileObjs) {
     with (app) {
          var orginalUIL = userInteractionLevel;
          userInteractionLevel = UserInteractionLevel.DONTDISPLAYALERTS;
          for (var i = 0; i < fileObjs.length; i++) {
               if (fileList[i] instanceof File) {
                    var fileName = fileList[i].name.slice(0, -4);
                    var docRef = documents.add(DocumentColorSpace.RGB, 576, 720);
                    with (docRef) {
                         var thisPlace = placedItems.add();
                         thisPlace.file = fileObjs[i];
                         var thisImage = placedItems[0].trace();
                         redraw();
                         thisImage.tracing.tracingOptions.loadFromPreset('Color 16');
                         thisImage.tracing.expandTracing();
                         redraw();
                         var svgOptions = exportAsSVGFile();
                         svgFilePath = new File(svg.fsName + '/' + fileName + '.svg');
                         exportFile(svgFilePath, ExportType.SVG, svgOptions);
                         var psdOptions = exportAsPSDFile();
                         psdFilePath = new File(psd.fsName + '/' + fileName + '.psd');
                         exportFile(psdFilePath, ExportType.PHOTOSHOP, psdOptions);
                         var aiOptions = saveAsAiFile();
                         aiFilePath = new File(ai.fsName + '/' + fileName + '.ai');
                         saveAs(aiFilePath, aiOptions);
                         close(SaveOptions.DONOTSAVECHANGES);                         
          userInteractionLevel = orginalUIL;
function exportAsSVGFile() {
     var svgOptions = new ExportOptionsSVG();
     with (svgOptions) {
            compressed = true;
          coordinatePrecision = 3;
          //cssProperties = SVGCSSPropertyLocation.ENTITLES;
          documentEncoding = SVGDocumentEncoding.UTF16
          //DTD = SVGDTDVersionSVG1_0;
          embedRasterImages = true;
          fontSubsetting = SVGFontSubsetting.ALLGLYPHS;
          fontType = SVGFontType.CEFFONT;
          includeFileInfo = false;
          includeVariablesAndDatasets = false;
          optimizeForSVGViewer = true;
          preserveEditability = true;
          slices = true;
          sVGAutoKerning = true;
          sVGTextOnPath = true;
     return svgOptions;
function exportAsPSDFile() {
     var psdOptions = new ExportOptionsPhotoshop();
     with (psdOptions) {
          antiAliasing = true;
          compatibility = PhotoshopCompatibility.PHOTOSHOP8;
          editableText = true;
          embedICCProfile = true;
          maximumEditability = true;
          resolution = 150;
          warnings = true;
          writeLayers = true;
     return psdOptions;
function saveAsAiFile() {
     var aiOptions = new IllustratorSaveOptions();
     with (aiOptions) {
          compatibility = Compatibility.ILLUSTRATOR12;
          compressed = true;
          embedICCProfile = true;
          embedLinkedFiles = true;
          flattenOutput = OutputFlattening.PRESERVEAPPEARANCE;
          fontSubsetThreshold = 0;
          overprint = PDFOverprint.PRESERVEPDFOVERPRINT;
          pdfCompatible = true
     return aiOptions;

Similar Messages

  • Trouble opening the free photoshop and illustrator trial downloads, please help!

    Trouble opening the free photoshop and illustrator trial downloads, please help!

    Dear Michael,
    In response to your questions, please see below;
    What OS? OS X 10.8.2
    What happens? When i click on the ''AdobePatchInstaller'' i get this message, ''Update Failed, Updates could not be applied. This patch is not applicable for you. Please check for updates from the Help menu in your product to see a list of latest updates available. If the problem persists, contact customer support for further assistance.
    Any error messages? No
    Did you have previous versions of the software on your system? No
    Is the trouble with the download or the installation of the software? I am not sure but i think it may be the download. It shows that the download was complete and icon appears on the desktop.                                                                                I plan to buy the ''Adobe Creative Suite 6 Design & Web Premium'' but i wanted to try it first via the free trials, especially Photoshop and Illustrator. So please let me know what i need to do.
    Kind regards,
    Nancy Gonda-Nesbeth
    Freelance Garment Technologist
    <Removed by Moderator>

  • My iphone keeps freezing, then turning itself off. Please help me resolve the problem whatever it is

    My iphone keeps freezing, then turning itself off. Please help me resolve the problem whatever it may be.

    You said that you restored it.  "forgot to mentioned that ive tried all of that"
    When you restore, you can restore from backup or as new.
    Did you or did you not restore it?
    iPhone User Guide (For iOS 5.0 Software)

  • When I download the digital copy of the Hunger Games, it stops at 4.0GB and first returns an error code -1309 and then the code -50. Please help me complete the download.

    When I download the digital copy of the Hunger Games, it stops at 4.0GB and first returns an error code -1309 and then the code -50. Please help me complete the download. I have tried removing the .tmp folder and downloading it again, but each time it stops the download in the same place.

    I discovered the solution. The external drive I was saving it to was formatted as FAT32. In that format, the largest files can only be 4GB, which explains why it kept stopping at 4GB. I backed up all the files then reformatted it as Mac OS Extended (Journaled), this is possible since I am on an iMac.

  • When i try to change my screen saver on my Mac 10.7.2 Lion, i hear a clicking noise on my computer and then it gets hung. Please help

    When i try to change my screen saver on my Mac 10.7.2, i hear a clicking noise on my computer and then it gets hung. Please help. Off late my computer is taking too long to open documents etc.

    If you hear a clicking noise, as in mechanical I'd be thinking along the lines of failing hard drive. Especially as you mention other problems.
    Boot from another disk if you have one and do a verify disk or use somethinglike Disk Warrior or Tech Tool.

  • Pple Application Suport isrequired to run itunes helper.Please uninstall itunes then installagain.  Error 2  Please help

    Apple Application Suport was not found.
    Apple Application Support is required to run itunesHelper.
    Please uninstall itunes then install again.
    Error2         Please help i did everything and still have the same problem

    With the Error 2, let's try a standalone Apple Application Support install. It still might not install, but fingers crossed any error messages will give us a better idea of the underlying cause of the issue.
    Download and save a copy of the iTunesSetup.exe (or iTunes64setup.exe) installer file to your hard drive:
    http://www.apple.com/itunes/download/
    Download and install the free trial version of WinRAR:
    http://www.rarlab.com/download.htm
    Right-click the iTunesSetup.exe (or iTunes64Setup.exe), and select "Extract to iTunesSetup" (or "Extract to iTunes64Setup"). WinRAR will expand the contents of the file into a folder called "iTunesSetup" (or "iTunes64Setup").
    Go into the folder and doubleclick the AppleApplicationSupport.msi to do a standalone AAS install.
    Does it install properly for you?
    If instead you get an error message during the install, let us know what it says. (Precise text, please.)

  • HT1386 my iphone does not sync with itunes on my second authorized computer, please help. i changed the first authorized computer in May 2012 and have been using the second authorized computer since then but it cannot sync - please help!!

    my iphone does not sync with itunes on my second authorized computer, please help. i changed the first authorized computer in May 2012 and have been using the second authorized computer since then but it cannot sync - please help!!

    "I was thinking I would just connect my iPhone and all of my music and other stuff would transfer to the new computer. "
    Not true. The music and pic sync is one way - computer to iphone. The only exception is itunes purchases. Without syncing: File>Transfer Purchases
    You really should transfer everything from the old computer, or your backup copy of your computer. Since you do not have access to the old computer, then use your backup copy of the old computer.
    If for some reason you have failed to maintain a backup copy of your computer ( not good), then you would have to transfer itunes purchased as described earlier. Any other itunes content would be lost.
    You can e-mail photo library pics to yourself, but they will not be of the original quality.
    Before syncing, enter at least one unique contact and calendar entry on the computer. When you first sync, then you should get the option to merge the data.

  • My Mac book pro won't start! It boots as far as the sign in screen and then everything goes black. Please help.

    My Mac book pro won't start! It boots as far as the sign in screen and then everything goes black. Please help.

    Which model MacBook Pro do you have (e.g., “15-inch Late 2011”) and which version of OS X are you running?
    Clinton

  • Does Photoshop Elements have a live trace tool like Illustrator?

    I use Illustrator at school but annoyingly only have Elements at home, and six weeks of school holidays in which I need to use the Live Trace tool... Does anyone know where the equivilent tool would be in either Elements or Photoshop, or if one even exists?

    It doesn't exist in PSE (or any image editing program).  Tracing is a feature of vector editing programs because it creates vector shape(s).
    Ken

  • Upgraded to Tiger and now can't open any illustrator files! Please help me!

    I upgraded my OS to Tiger and then updated to 10.4.8 and now can't get any of my Illustrator EPS files to open. I have spent the whole day trying to figure this one out (Launch Services advice in other posts) without any luck. What is going on here?!!! I have so much serious work to get done this weekend!
    Please help me!
    Amy

    It's hard for anyone to offer any advice when you don't tell us what specifically is happening or not happening. Is there an error message? If so, what does it say? What version of Illustrator are you using? Does Illustrator open at all? Does it open regular Illustrator files? Have you reinstalled Illustrator?

  • Need to delete Scheduled Tasks automatically using a script or schtasks.exe, but it is NOT allowing it - PLEASE HELP!

    I have tried and tried to get this to work in a script, but it simply is NOT doing what I need. I am simply trying to run
    schtasks /delete /tn <task name> /f
    but when I do, I receive the following ANNOYING ERROR:
    ERROR: The system cannot find the file specified.
    I am looking right at the task in the Task Scheduler utility, so I know it EXIST!!
    Then, when I run a "schtasks /query" I see that the task I want to delete has the following information:
    INFO: There are no scheduled tasks presently available at your access level.
    I can delete the tasks just fine in the Task Scheduler console, but I NEED this to be automated so these tasks can be deleted on multiple systems. 
    Can someone PLEASE help me out with this. The systems I need this to run on our Windows 7 SP1. 
    Thank you

    Listen up dude, I am not a home user I am a professional and this same issue is spread all over the internet with most professionals scratching their head not understanding why it is not working.
    However, I found the answer here:
    http://www.jonathankeller.com/2012/02/schtasks-query-tn-tasks-over-network.html
    So you see "dude" even your link shows that you were not a professional as any professional would have read the help first.  Your post give no information as to what you are doing and assumes that a system utility is a script which nearly
    all professionals agree that system utilities are not scripts.
    From the question and the very arrogant response it is clear you are a home user with no formal technical training....or are you theoffice manager who was stuck with doing these things for your boss?
    Your "handle" is also very unprofessional and telling about your "I AM Sir Ask A lot".  Try studying the technical information about Windows.  Learn to start with the system help.  It will save you a lot of blood pressure
    excursions.
    Also note that the help is explicit.  Use the folder path syntax returned from /Query and not the one you see in the GUI.  Again - learning to use help first would save a lot of headaches.
    Stick with it kid.  When you get to by half my age you might be able to call yourself a "professional".  Until then - hit the books.
    ¯\_(ツ)_/¯

  • My iTunes won't even load anymore, when I click the icon, it looks like it will open and then it doesn't. Please Help!

    iTunes will not open at all. It looks like it will and then it doesn't (the windows loading symbol appears and then it disappears). I even tried uninstalling iTunes and downloading it again and installing it, nothing works! Please Help!

    1. First check if this file APSDaemon.exe is the problem here.
    Close your iTunes.
    Press Ctrl-Alt-Del key and choose Task Manager. In the "Processes" Tab, select the file APSDaemon.exe and click End Prosses button, then close the task manager window.
    Now open itunes and see if it is working?
    If that works, to prevent having to do the same process everytime you restart Windows, go to. START button, type in
    MSCONFIG
    Hit ENTER
    Click STARTUP Tab, Uncheck "Apple Push", click OK.
    Restart Windows.
    2. If that fails, refer to following article to remove SC Info.lib file:
    http://support.apple.com/kb/TS2363
    3.  If that fails, repair or reinstall your Quicktime.  START / CONTROL PANEL / PROGRAMS N FEATURES / hightlight QUICKTIME and click REAPIR.

  • Help! Computer turns on but then will not boot up - Please Help!

    I have no idea what happened to my Apple. Someone please help me. My powerbook currently is running on no battery (recall victim) and now the entire computer is no longer functioning at all. I installed iTunes 7.0 and then the trouble began. I had to restart the computer, so I did that and then the computer just wont boot up. It goes to the grey screen which shows the Apple symbol and occurs right before my log in then just continues to read. The green light for the battery is function and nothing at all is working. The computer simply will not boot up, I have tried unplugging it for the night and then rebooting it and nothing. Please someone help, what has went wrong?

    You mentioned in your other thread that you had trouble with a cpu(0) hardware error trying to use the hardware test disk. Is this the hardware test disk which came with that particular machine? If not, then you need to find the original hardware test disk that came with that machine. If the restore disks that say 12" Powerbook include the words hardware test, use those instead and follow these directions:
    http://docs.info.apple.com/article.html?artnum=86287
    If you are using the correct hardware test disk and you get a cpu(0) error using it, then the machine has a hardware problem.

  • I can't search a song or an artist.  i get an error R6025/pure virtual function call. then itunes stops working.  PLEASE HELP

    I can't search a song or an artist without getting an error R6025 - pure virtual function call. Then itunes stops working. How do I fix it?  PLEASE HELP

    I have had numerous issues with Itunes 64 bit 11.1.38 (and other previous versions) locking up and crashing upon start with "Itunes has stopped working" or "R6027 pure virtual function call".  I have researched the answers around the forums as well as having tried some extensive and repetitious troubleshooting myself and thought I'd list them here... in order of troubleshooting...
    1. Install all Windows updates and reboot.  This seems to clear issues from time-to-time... I suspect Itunes expects the latest-and-greatest as far as Windows is concerned.. see if this clears your issue.
    2. Uninstall all Itunes and Apple products & reboot, remove their directories, remove lingering Itunes registry entries, reboot again, reinstall using "RUN AS ADMINISTRATOR" to install the Itunes executable. See if this allows Itunes to stabilize.  Pelase be sure to use the following guide from Apple as far as removing the apps and directories are concerned...
    http://support.apple.com/kb/ht1923
    3. Remove the contents of the "iphone photo cache"  (or other related product photo cache)  directory.
    4. Try editing the shortcut properties and configure the shortcut (for all users) to run as Administrator.
    5. Try editing the shortcut and configure it to run in Compatibility Mode for Windows 7 (for all users).
    6. a.Try using MSCONFIG to locate a potential conflicting application or service using the following...
    http://support.apple.com/kb/ht2292
    or
    6. b. Remove the last recent software application(s) you may have installed... in my case removing GREENSHOT http://getgreenshot.org/  stopped my Itunes from crashing on startup and it stabilized after
    driving my nuts for weeks.
    Message was edited by: DaCheeze

  • Installed the OS X Yosemite my computer  froze up daily, trying to reinstall then I got really stucked, please help

    My computer kept freeze up daily with OS X Yosemite installed a while ago, and I followed the other  instruction to do "OS X" Recovery to: (1) erased my start up disk (2) Reinstalling Mac OS X Yosemite.
    While  about 18 or 20 minutes remaining from the installation, it went back to 2 hours 57 minutes but stuck there. I let my computer run over night but it was still at 2 hours 57 minutes. so I cancelled the installation which seemed to be the only choice.
    I tried again today, erased my start up disk and reinstalled again, same situation happened again, when the remaining time said around 20 minutes, it went back to 2 hours 56 minutes and stuck there.  I cancelled it again.
    I read some other instructions in this community and did a hard shutdown and restarted while hold down the command key + R key. it took me to the disk manager screen and the only choice I had was the OS X Lion version.
    I tried to install the OS X Lion, it said that will take 3 hours or so, after 20 minutes, a screen came up and said I need to turn off the computer by press the power button down then turn the computer on again.  And I did.  When I turn on the computer again, with Comand + R key pressed, I had to wait for an
    internet recovery before I went back to the disk manager and trying to reinstall the OS X system. It kept coming back to ask me to turn the power off…
    what can I do?  Please help,
    MacBook Air

    Boot back into the Recovery Partition. Run Disk Utility Verify/Repair and Repair Permissions until you get no errors. Then re-install the OS.
    X Yosemite Installation Stuck with Minutes Remaining?

Maybe you are looking for

  • How to generate multi-lingual applications with Designer?

    In Designer 10g we have the definitions of hundreds of tables and views and forms/reports modules. Currently all texts (prompts, hints, comments, help texts, etc) are in Dutch. Because of new customers in Germany, we now have to translate everything

  • Clicking on a music (MP3) link doesn't work - new window pops up but nothing happens?

    As stated above - a blank (UNTITLED) window pops up, but no player, no music. I just had some issues (virus, etc) and my PC was undated, fixed with the newest version of Firefox installed. I'm I now missing something?

  • Mod_jk2 package for Solaris 10 x86

    I need a mod_jk2 package for Solaris 10 x86 so it will be part of my installation, thus build is not good enough. Can anyone help? Oren

  • Aperture 3 Not Working at all

    I have briefly scanned these post but don't see anyone saying ***. I have just updated to Aperture 3 and my system has crashed several times already and when its not crashing it is virtually unusable. I am on a MacBookPro 2.16 running 10.5.8. I had n

  • Java libgcj-java-placeholder.sh Issues

    Hello, I installed j2sdk1.4.2_05 and j2re1.4.2_05 unser /usr/java on my RHEL server. When typing "which java" and "java -version", under the "oracle" user I do not get the version installed. Instead, I get a message "...libgcj-java-placeholder.sh..."