Passing POSIX file path to Adobe Illustrator to run ExtendScrip

Here's the code snippet I started with
tell application "Adobe Illustrator"
    activate
    delay 10
    set pfilepath to "/Users/username/Documents/Temp/someFile.ai"
    set pfile to POSIX file pfilepath
    open pfile as alias without options
    delay 10
    do javascript "#include '/Users/username/Documents/Temp/someScript.jsx'"
    delay 1
    quit
end tell
activate, open, quit, and "do javascript" commands are from/for Adobe Illustrator AppleScript API.
I originally ran the snippet through Python interface to Applescript and that didn't produce any error statements to debug, so I then executed directly from Applescript editor.
I'm using Mac OS X 10.9.5 with Adobe Illustrator CS6. The Applescript reference for Illustator CS6 should be this:
http://wwwimages.adobe.com/content/dam/ … Script.pdf
http://wwwimages.adobe.com/content/dam/ … -Guide.pdf
Does the code & syntax look correct, or what might I be doing wrong? Because the script is not currently working. I get error about can't get POSIX file. Tweaking code yesterday, with help of someone online in another discussion forum, I get other related errors, but as that discussion got deleted, I don't recall the exact tweaks and errors, but suffice to say, tweaks didn't help.
I personally am not familiar with Applescript. I know & prefer Windows COM API.

Thanks for the comments. I cross posted in MacScripter and this ended up working:
set pfilepath to POSIX path of (path to documents folder) & "Temp/test.png"
set pfile to POSIX file pfilepath as text
   open file pfile without options
and this was the reasoning given: POSIX file returns a file URL. AI and PS aren't able to recognize this type. The solution is to coerce file URL to text (HFS path)

Similar Messages

  • Illustrator cannot open files in the "Adobe Illustrator Document" format.

    I recently upgraded from CS4 to CS5.5 on my Mac (10.6.7), and now when I try to open a .ai file, I get the error:
    Illustrator cannot open files in the “Adobe Illustrator Document” format.
    Google doesn't seem to be much help other than one other person who had the same issue. Any idea why Illustrator can't open Illustrator documents?

    Actually, quitting Illustrator and re-launching it solved it. It was the first time I had launched Illustrator after installing it, so maybe it had something to do with that.

  • What can I do to respond to an "Adobe Illustrator cannot run" message?

    I have a PC running Windows7 with a virtual machine running in XP Mode.  I loaded my old Adobe Illustrator 9.0 on the XP side.  The installation went smoothly.  When I try to start Illustrator I receive a "Adobe Illustrator cannot run" message.  Criptic to the point of being useless.  I used Windows Explorer to pull up all the Adobe files.  Nothing appears amiss.  Ideas/suggestions will be welcomed.
    Thanks 

    Well folks I finally got my "can't connect to iTunes" issues fixed. Seems that there was an unauthorized change to my email address and account therefore not allowing mr to connect to iTunes.
    Here is how I got it fixed.
    1. Contacted iTunes store support
    2. Followed their instructions and replyed with the following info:
    An order number from one of my purchases
    Last 4 digits of the c.c. Used for the iTunes store acct
    Answer to one of my security questions
    And 2 items from this list.
    Birthdate
    Billing address for Acct
    Phone number on acct
    It was after all of this that they saw that someone had made an account modification back in February when the issue began. Seems they changed my email address just slightly and that is what kept me from being able to sign in and not a password issue. This was likely due to a phishing email that came out in conjunction with iCloud asking users to change their passwords to a more secure form by adding a capital and number.
    To get all of this cleared up it took about 4 days as we emailed back and forth. I also needed a seperate email address they could use to send me info. Once they determined the issues and went to get them fixed by changing the email address associated with the acct and I created a new password I was able to access iTunes with no issues and even my previously thought lost acct balance was there.
    Hope this helps
    Crash

  • Last version of Adobe Illustrator to run on G5Quad Power Mac ?

    Can anyone confirm that the last version of Adobe Illustrator to run on my G5 Quad Power Mac is 12.0.x, the one otherwise loosely known as "CS2"?
    Or is it Illustrator 13.0.x?
    (I'm currently running AI 10.0.3.)
    Thanks in advance.

    CS3 is compatible:
    http://store.adobe.com/store/en_us/popup/software/creativesuite/mastercollection /systemreqs.html
    CS4 is compatible:
    http://helpx.adobe.com/creative-suite/kb/system-requirements-cs4-point-products. html#main_MacintoshSystemReqs

  • How to convert a .psd file into .ai (adobe illustrator)

    Hi Guys,
    I have a very high quality multi layer .psd file that I need to convert to adobe illustrator in order to export them into autocad.
    As I'm very in exprienced, Ive tried to merge the layers in the psd file and then use Export -> 'Path to Illustrator', however when I open the newly created .ai file, it open a dialog box called 'Convert to Artboards' and whatever option i choose (either Legacy Artboard or Crop Area(s)' my new illustrator file seems to be empty.
    I appreciate any file anyone can offfer.
    Best Regards
    Alex.

    Importing PSD files into Illustrator
       •   Opening PSD files into Illustrator
    1.  Turn on your computer and launch the Illustrator program.
    2.  Open a new document by clicking File>New in Illustrator’s menu bar.
    3.  To open your Photoshop document, go to File>Open and then select the document you want to open when prompted.
       •   Placing PSD files into Illustrator (Editable)
    This method is ideal if you wish to incorporate a Photoshop document within an existing Illustrator document which can then make the PSD file editable within Illustrator.
    1. Launch the Illustrator program, select File>Place
    2. Locate the PSD file you want to import and click “Place”. Make sure the “Link” option is not selected.
    Placing or opening an unlinked Photoshop file will prompt a dialog box with options, choose the most appropriate option and then click “OK”.
    • Convert Layers to Objects: This option will convert the Photoshop layers into Illustrator objects to be able preserve masks, transparency and blending modes.                  
                                 • Flatten Layers to a Single Object: This option will flatten all the Photoshop layers into a single layer to preserve the look and appearance of the image; however individual Photoshop layers will no longer be editable.
       •   Placing PSD files into Illustrator (Not Editable)
    This method is ideal for incorporating your Photoshop files in an existing Illustrator document. Although the PSD file will no longer be editable it will be able to maintain a link to your original Photoshop file.
    1. Launch the Illustrator program, select File>Place.
    2. Locate the PSD file you want to import and click Place. Make sure the Link option is selected.
    - See more at: http://www.hiddenwebgenius.com/blog/design/how-to-import-psd-files-into-adobe-illustrator- and-indesign/#sthash.u19RHWSB.dpuf
    **The one time it did not work for me and appeared black was because of shadows (hue/saturation adjustment layer). So I compared the old .psd file, that converted fine, to the current one I was trying got send. One of the differences was the introduction of shadows by duplicating the fonts and image shapes, then merging them to a single image with hue/saturation adjustments. When adjusting the hue/saturation, it appears in a separate layer that was locked to next to image that was just produced. Some reason that was the bug that kept Illustrator from placing the .psd file in Illustrator. The solution was to merge the hue/saturation layer with the image layer. Now it’s back to normal.
    Hope this save you some time.

  • The preferences file is corrupt: adobe illustrator cs4

    greetings!
    every time i start illustrator i encounter a new error.
    "the preferences file is corrupt and has been reset to the default settings."
    "the corrupt file will be backed up as Adobe illustrator Prefs.err"
    this problem manifested after i added some more .ai and .ase files to my swatches directory. i do not believe anything else changed.
    not sure how to diagnose the problem. is there a debug mode or something? perhaps an offending file.
    an option would be to try remove each added swatch file or folder individually, but this would e a very very time consuming process for me.
    i use cs4 on a Macbook pro running Snow Leopard - 10.6.2 and would appreciate your advice.
    thank you
    -s
    Message was edited by: Shenzi

    The problem is that you're not getting rid of the corrupt Illustrator preferences. To do that, go to User/Library/Preferences and drag the entire Adobe Illustrator CS4 Settings folder to the trash (or to another drive if you want to keep it for some reason). Illustrator will then create a new Preferences folder the next time it's started. It's unlikely the problem was caused by swatches files, but if the error comes back after deleting prefs, then you'll need to determine which swatch file is causing it.

  • Getting complete file path in Adobe Interactive Form

    Hi All,
    I have a requirement where I have a field ZPATH1 on Adobe Interactive Form. I am putting a BROWSE button and writing following JavaScript on CLICK event on this button for populating the chosen file path into field ZPATH1.
    *Start of JavaScript
    var sFile;
    event.target.importDataObject(sFile);
    var oFile;
    oFile = event.target.getDataObject(sFile);
    this.parent.parent.Sub_Form_Fields_Mass.ZPATH1.rawValue = oFile.path;
    *End of JavaScript
    1. event.target.importDataObject(sFile) --> Giving me the pop up to select the file.
    2. this.parent.parent.Sub_Form_Fields_Mass.ZPATH1.rawValue = oFile.path; --> Putting the oFile path in field ZPATH1 on the form.
    3. This way is only giving me the selected FILE NAME whereas I need the complete path.
    I have tried below way also:
    this.parent.parent.Sub_Form_Fields_Mass.ZPATH1.rawValue = even.target.path;
    This function returns me the complete path but in URL form. It does not give me the presentation server path.
    Please suggest me how to get the complete path of presentation server to the file.
    Appreciation would be honored in form of points!!!
    Regards,
    Ashish

    please post it here for quick response
    and also search in adobe forums also for java script related.
    http://www.adobe.com/support/forums/index.html

  • Need to capture full file path in Adobe Interactive Form

    Hi All,
    I have a requirement where I have a field ZPATH1 on Adobe Interactive Form. I am putting a BROWSE button and writing following JavaScript on CLICK event on this button for populating the chosen file path into field ZPATH1.
    *Start of JavaScript
    var sFile;
    event.target.importDataObject(sFile);
    var oFile;
    oFile = event.target.getDataObject(sFile);
    this.parent.parent.Sub_Form_Fields_Mass.ZPATH1.rawValue = oFile.path;
    *End of JavaScript
    1. event.target.importDataObject(sFile) --> Giving me the pop up to select the file.
    2. this.parent.parent.Sub_Form_Fields_Mass.ZPATH1.rawValue = oFile.path; --> Putting the oFile path in field ZPATH1 on the form.
    3. This way is only giving me the selected FILE NAME whereas I need the complete path.
    I have tried below way also:
    this.parent.parent.Sub_Form_Fields_Mass.ZPATH1.rawValue = even.target.path;
    This function returns me the complete path but in URL form. It does not give me the presentation server path.
    Please suggest me how to get the complete path of presentation server to the file.
    <REMOVED BY MODERATOR - REQUEST OR OFFER POINTS ARE FORBIDDEN>
    Regards,
    Ashish
    I have also tried below way:
    <MOVED BY MODERATOR TO THE CORRECT FORUM>
    Edited by: Alvaro Tejada Galindo on Oct 17, 2008 3:26 PM

    please post it here for quick response
    and also search in adobe forums also for java script related.
    http://www.adobe.com/support/forums/index.html

  • How to open Isodraw file (.ISO) in Adobe Illustrator?

    Hi there,
    I can't open the .iso file from Isodraw (PTC) in Adobe Illustrator. Do i need to have a conversion agent to convert it to .ai in order to open in Adobe Illustrator?
    Thanks!
    Regards,
    Jacqueline

    Illustrator cannot open IsoDraw's native format.
    Whenever Program A cannot open the native format of Program B, you have to find a format that Program A can export and Program B can import. So...
    If you have access to Program A, check its specs (or its export options) see what formats it can export.
    See what formats Program B can import (or Open).
    When you find a match, export from Program A in that format, and then open it in Program B.
    Expect some trade-offs, because the format used for the exchange will likely not support all the native features of the exporting program.
    IsoDraw is supposed to be able to export .AI, DXF, DWG, all of which Illustrator can open.
    JET

  • How to capture full file path on Adobe Interactive Form using Acro JS

    Hi All,
    I have a requirement where I have a field ZPATH1 on Adobe Interactive Form. I am putting a BROWSE button and writing following JavaScript on CLICK event on this button for populating the chosen file path into field ZPATH1.
    *Start of JavaScript
    var sFile;
    event.target.importDataObject(sFile);
    var oFile;
    oFile = event.target.getDataObject(sFile);
    this.parent.parent.Sub_Form_Fields_Mass.ZPATH1.rawValue = oFile.path;
    *End of JavaScript
    1. event.target.importDataObject(sFile) --> Giving me the pop up to select the file.
    2. this.parent.parent.Sub_Form_Fields_Mass.ZPATH1.rawValue = oFile.path; --> Putting the oFile path in field ZPATH1 on the form.
    3. This way is only giving me the selected FILE NAME whereas I need the complete path.
    I have tried below way also:
    this.parent.parent.Sub_Form_Fields_Mass.ZPATH1.rawValue = even.target.path;
    This function returns me the complete path but in URL form. It does not give me the presentation server path.
    Please suggest me how to get the complete path of presentation server to the file.
    Appreciation would be honored in form of points!!!
    Regards,
    Ashish

    please post it here for quick response
    and also search in adobe forums also for java script related.
    http://www.adobe.com/support/forums/index.html

  • Does Adobe Illustrator 10 run under Mavericks or Yosemite?

    I've put off upgrading from OS 10.6.8 because I do a lot of work in Adobe Illustrator 10.  I can't really justify the expense of upgrading to any of Adobe's Creative Suite packages because the Illustrator work I do doesn't bring in any revenue.  Increasingly, other software I need will no longer run under 10.6.  I'm kind of between a rock and a hard place on this.  So, is anybody out there able to run Illustrator 10 under Mavericks or Yosemite, or even OS10.8?  Thanks.

    Upgrading an OS does not have to be an all-or-nothing proposition. You can simply have two operating systems installed, if you want to preserve Snow Leopard and Illustrator 10, and also use a later OS for other apps. You can add an external HD for the newer OS and apps for way, way less than the cost of Illustrator 5.5. You can also use your new drive/OS to safely explore the workability of running Snow Leopard Server in a VM (virtual machine) using Parallels or VMware Fusion on a 10.8 or later system. It would cost a very modest amount to try the combination of VMware Fusion and Snow Leopard Server. Server is available from Apple for $20 (but only by calling them). I don't remember what Fusion costs, but it works well and the license allows you to install it on more than one machine, which the Parallels' license doesn't.

  • Macbook Air 11" i7 corrupt files problem with Adobe Illustrator CS4

    Hi
    this problem may not be entirely related but maybe someone could help anyways or knows how I can proceed...
    I'm running Illustrator CS4 on a Macbook Air 11" (latest 2011 model, with i7, 4GB, 128SSD), and lately some files are getting corrupted. specifically, adobe illusrator CS4 files with weeks of work. interestingly, the time machine backups are also getting corrupted.
    its like I'm working on a file for a few days, backing up with time machine as well
    closes the file, after a few days returns to it… (normal behavior)
    then when i try to get back to the file then sometimes it says "Cant open the illustration, could not complete the operation" and opens a blank canvas.
    restoring the file via time machine also gives the same error (its like all versions get corrupted simultaneously), even 4-5 versions backwards, even though they worked before when the file worked
    it happened quite a few times, ruining weeks of work.
    I tried the following:
    reinstalling CS4 - didn't work
    Opening the files on CS5 - still don't open
    doing the file recovery thing and then opening it in a notepad - didn't work at all
    using Time machine - the files are still corrupt
    it only happenes with AI files, not photoshop files, for example.
    I thought maybe it has anything to do with SSD? since my previous macbook pro (15", 2007) never did these errors…
    please help
    Eido

    If at all, this would be I/O performance and bandwidth issues with Time Machine, but I don't think that's the problem. More to the point I think that it's a case of Preview opening the files to genereate thumbnails and icons and something going wrong there. I'd look up some guides on how to edit the relevant plist and conf files to exclude your AIs or turn off the behavior to generate these previews globally. This may help hugely...
    Mylenium

  • Cannot print to local file path since Adobe Reader XI (11.0.6) update

    I am attempting to print any PDF file to a windows printer that uses a port pointing to a local path (e.g. c:\test\testprint). This functioned successfully in the previous versions of Adobe Reader and since the update to 11.0.6 Adobe Reader will not print at all to this printer. I have attempted using different printer drivers and print processors which do not appear to impact the issue. If I point the printer to a port that points to a network path it works.
    Has anyone else seen this?
    Thank you.

    Please try after whitelisting the path of local port (c:\test\testprint) using custom policies.
    http://www.adobe.com/devnet-docs/acrobatetk/tools/AppSec/protectedmode .html#policy-configuration

  • AppleScript POSIX file path from alias?

    How can I get the POSIX path of a folder or file from the alias returned by the choose folder or choose file commands?

    Here:
    POSIX path of (choose folder)
    It works the same with choose file.
    (103118)

  • How to release Compound Path in Adobe illustrator javascript

    Hi,
      How to release Comound path with java script

    Thanks For answer
    Actually i want to take .PNG image for compound path Items.
    But when i release compound path Items then it is break in small small object.
    When i save compound path items separately it saved as a blank image...
    What am i do now.

Maybe you are looking for