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
endtell
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.