Tell application "Adobe Illustrator" to open POSIX file pth However, the following does not work as you’d expect: set pth to "/Users/foo/test.ai" SE reports error "Adobe Illustrator got an error: AppleEvent handler failed." number -10000 This works as expected too (notwithstanding the awful quality of AI’s error messages): set furl to POSIX file "/Users/foo/xxxxx.ai" - a non-existent file Tell application "Adobe Illustrator" to open furl Set furl to POSIX file "/Users/foo/test.ai" Tell application "Adobe Illustrator" to open alis The following examples work exactly as expected on AI 2020 (which I’ve just installed) and CC 2017 running under macOS 10.14.6: set alis to alias "Macintosh HD:Users:foo:test.ai" - an existing file Hopefully Adobe will either update their AS dictionary or fix the bug. So, the only work-around for now seems to be ignoring the dialogs parameter. Remove without dialogs and it opens as expected. In AI 2020, with the same file reference, open theFile as alias without dialogs To test this hypothesis, I cranked up an older Mini that still has AI 2019 on it, and tried: set theFile to "Users:Mac User:Documents:Illustrator:myFile.ai"Īs expected, this worked just fine, as it has for years. Though this worked fine in AI 2019, it is causing the open command to crash in AI 2020, even though the AI 2020 dictionary still shows "dialogs" as an optional boolean parameter with the same syntax as the 2019 version. To the open command in order to bypass any regular dialogs AI might present when opening the file. However, turns out that with AI 2020, the culprit is the optional "without dialogs" parameter in conjunction with an alias or POSIX-style variable reference to the file.Īccording to the dictionary one would append without dialogs Open POSIX file "/Users/Mac User/Documents/Illustrator/myFile.ai" without dialogs It was very confusing that if one hard-coded the path, i.e., Tell Adobe Illustrator I very much appreciate all the replies and comments, and still believe there is a bug in AI 2020's open command will be heading over to Adobe to see if anyone else has reported it. 'k, the issue does not seem to be with regards to HFS or POSIX paths, per se. Not much on the 'tubes yet, but I have run across:įrom a little less than a week ago, which seems to be describing the same issue.Īnyone else run across this, or know how to get around it? # without quoting HFSPath above also crashesĪm suspecting Adobe maybe dropped a low-level routine that dealt with HFS, and with this routine failing, the open command cannot "see" the file to open it. # open POSIX file (quoted form of thePosixPath) Open POSIX file thePosixPath without dialogs # Crashes with "Adobe Illustrator got an error: File/Folder expected" # open (theHFSPath as alias) also crashes # Crashes with "Adobe Illustrator got an error: The specified file could not be opened because it could not be found" Open POSIX file "/Volumes/Mac HD/Users/Mac User/Documents/Illustrator/myFile.ai" without dialogs # i.e., '/Volumes/Mac HD/Users/Mac User/Documents/Illustrator/myFile.ai' Set thePosixPath to quoted form of theHFSPath Illustrator 2020 can open a file referenced by a hard-coded string in posix-style format, but it cannot open that same file from a variable, either an HFS-style alias, or quoted posix-style string, i.e, set theHFSPath to "Mac HD:Users:Mac User:Documents:Illustrator:myFile.ai" Haven't tried Photoshop yet, but most of the automation I use there is in the form of their internal "Actions".Īfter a little research, am thinking they may have tinkered with HFS support, resulting in unanticipated consequences. INDD files to prevent the "save-as" dialog next time they are used, which can mess up scripting. InDesign does not seem to have been affected, as every time a major version upgrade occurs I run a script on some several hundred. No "Just Use JavaScript" suggestions please, unless you can confirm or deny that the problem also occurs in JavaScript.Īm wondering if Adobe has made a change to their Illustrator API, as, since upgrading to the new 2020 version, Applescript files that used to work with earlier versions of Illustrator are now having difficulty opening files when referred to by an alias, or a variable in posix-style format. Sticking to AppleScript in this discussion. (Don't think this should matter, but am not prepared to upgrade the OS, as NVidia still hasn't released drivers for the TitanXP GPU the system uses).
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |