Illustrator Applescript open command is broken

Hi, Scripters have been doing many different things with Illustrator over the years. One of the things that allows that is the ability to open the files we need to process. Many things could prevent a file from opening, so the open command has a nifty dialogs parameter, that allows a scripture to ask Illustrator to open a file but regardless of any issues, prevent a dialog from opening. On top of that, Illustrator can be asked to not display any dialogs at all with the user interaction property.
Alas, the new Illustrator has a missing fonts dialog box that will not go away. It has the TypeKit logo at the top, so many folks, me included, got annoyed with TypeKit, but that was misplaced.
Adobe: If we can't confidently ask AppleScript to open a file without it, well, not opening, we are kind of screwed.
Please put someone on this task: When the open command is invoked with the dialogs parameter set to false, do not show the Missing Fonts dialog.
It has to happen and it has to happen quickly.
Thanks! Happy-scripters everywhere.

Aloha Hanaan, me old partner in crime...
Alas, ill-mannered dialogs have always been a problem with AI. Super annoying, but then I read about all the other horrors Adobe perpetrate on their scripting users and am personally quite glad they leave AI's Apple event support largely alone.
I'm not familiar with this particular dialog (I'm currently still slumming it on CS6 for development purposes), but I have had the exact same problem in the past with Universal Type Server's "missing font" dialogs, which don't respect any of AI's user interaction settings either. I've even had problems with AI itself throwing up "swatch conflict" dialogs when duplicating content between documents.
To what extent these missing font dialogs are AI's fault versus the font manager's fault I couldn't say offhand. I'd have to spelunk the AI SDK to see if it provides any hooks for plugins to determine AI's current user interaction settings prior to throwing up dialogs and/or instructs plugin developers to respect those settings, and frankly if I wanted to deal with AI's C* APIs I wouldn't be using its scripting interface in the first place.
Either way, as W_J_T says, you need to submit a bug report directly to Adobe if you even want them to be aware of the issue. Whether they'll bother to fix it, who can say... the entire AppleScript world ain't exactly blooming with health these days, so I doubt a fix will be high priority assuming it's even practical.
In the meantime...
The workaround I used was to create a separate 'dialog monitor' service that my AI scripting code would activate before performing a command known to trigger badly-behaved dialogs, then deactivate again once the troublesome operation was done. While running, the service would use GUI Scripting to poll the state of AI's GUI every second or so, and if it detected the appearance of a dialog would figure out what type of dialog it was and click the appropriate button to dismiss it.
Obviously, this logic had to be individually coded for each type of dialog encountered, could be a tad fragile (though I did my best to make it cope with stuff like window order changing), and tended to require updating when new versions of software were installed. But it worked well enough
As this was all running on a headless Mac, I also wrapped the problem command in a try statement that'd catch any "timeout" errors, take a screenshot of AI's UI so I could see what (if any) dialogs were displayed at the time, then kill -9 the AI process and email me a full error report before restarting AI and proceeding onto the next job as normal. That way, any time the system got stuck on a dialog I'd not seen before, I had lots of troubleshooting info available to diagnose the problem and start working on the solution for that.
Being a Python weenie I just used a background thread to run all this stuff, but as an AppleScripter it shouldn't be any harder for you to write a stay-open 'dialog monitor' applet that does the UI polling from its `idle` handler. Just have your main script run and quit the monitor applet when needed, and mind and have it deal with any timeout errors as appropriate should your dialog monitor be unsuccessful in dismissing a dialog before the command gives up.
HTH
has

Similar Messages

  • Illustrator applescript open multi-page PDF error

    Hi all, I am trying to create a script to find and replace objects in a multi-page pdf in Illustrator.  Everything else works except for open and save, which I still have to do manually.  I tried to open the file using the following
    open myFile as PDF with options {class:PDF open options, page:4}
    But Applescript returns the error "Expected class name but found application constant or consideration." 

    Checkout this discussion
    http://forums.adobe.com/thread/499840?tstart=0
    esp the last from Mario Arizmendi

  • Basic Applescript open command... help!

    Hi
    I'm completely new to AppleScript (and need to use it for an assignment)
    Im being asked to create a script that could be used on any mac that will ask the user to open a file, describe what the file is about, then have that selected file open automatically. As of right now I cant seem to find any script that will allow the user to open the variable/selected file... heres what I have so far:
    set variable to choose file with prompt "Please select a file to be opened"
    set variable to display dialog "Please enter a short description of this file" default answer ""
    tell application "Finder" to open..................
    I dont know if Im doing this right, can anyone help?
    Another problem Im having is getting the computer to speak to the user telling them that their file which they selected is now opened (once it is).... I understand the say command, but I dont know how string the information from when the user enters the description of the file into the command for the computer to say it. For example, "The file described as (description entered previously by user) is now opened".
    Help please!

    Try using:
    set variable1 to choose file with prompt "Please select a file to be opened"
    set variable2 to text returned of (display dialog "Please enter a short description of this file" default answer "")
    tell application "Finder" to open variable1
    say "The file described as " & variable2 &" is now opened."
    (56982)

  • Illustrator 6.0 vector paths, when opened in Illustrator CC are now all broken into segments?

    Illustrator 6.0 vector paths, when opened in Illustrator CC are now all broken into segments at key points (ie. a circle, has become a series of 4 quarter circle lines. Has anyone experienced this and is there a quick fix? I still have both Illustrator versions installed and can go back to use the original files, however I'd like to upgrade smoothly without having to redo all my vectors!    

    That is strange sounds like what happens when you open a die built in autocad, in illustrator. What happens if you paste a CS6 path into CC?

  • Illustrator CS3 crashes on "Open" command

    The only thing different between today and last night is the Adobe Updater tried and failed to download the 13.0.1 update. I had not used Illustrator today before the update tried to run, but failed with the installer message: The update cannot be applied to this product.
    Had to use Illustrator CS3 this afternoon and it crashed every time I tried the Open command. It did this from both the start up screen, by going through the menu and by using the command-open keyboard short cut.
    I have tried the command-option-shift start program to rebuild the prefs but that does not correct the situation.

    Ended up deleting everything using the program in the Utilities folder reinstalling. Not sure I'll use any Illustrator updaters again.

  • Illustrator applescript jpeg export options

    Mac, Illustrator CS4, Applescript
    I need of a jpeg droplet that converts Illustrator files to jpegs. I was able to create one using the Image - Duplicate as JPEG.scpt script that comes with OSX by just adding .AI to the list of files to convert.
    The problem is that Image Events was creating jpegs of my Illustrator CS4 files at 150ppi when i need smaller jpegs.
    I changed the code to use Illustrator to open and export the jpeg instead of Image Events which does result in a 72ppi jpeg. The problem though is that i cant seem to get any of the jpeg export options to work, it seems like it just exports with default settings.
    Id like to change the jpeg compression and id like to export the entire dimensions of the artboard and only the artboard. Artboard Clipping is a property under Jpeg export in the applescript references but it doesnt seem to work so i must be doing something wrong.
    Any help would be very much appreciated!
    Attached is my applescript.
    Thanks
    J

    OK i changed the code and I think I got it. Instead of setting a myOptions string variable and setting jpeg with myOptions I just typed it in at the export line. I also noticed that the resolution property i put in the options was causing a problem so i took that out.
    I attached it for anyone who could use it.
    J

  • Version 10 "File Open" command does not list older file versions

    When using the "file open" command in Illustrator 10, I noticed that the file list that appears in the window does not show older versions of illustrator files even though the File Type drop down box indicates "All formats". If I go to the file directory through Windows and then double-click the old version file (say Illustrator version8), the file automatically opens in Illustrator 10 without any problems.
    Is there a setting in Illustrator 10 that allows all files to show up in the "File Open" command?

    While I don't doubt you're experiencing this problem, I am at a loss as to how it can happen.
    Short of parsing every file in a folder, Illustrator cannot possibly "know" the versions. I could be wrong, but the only criterion for appearing in the file | open dialog is the file extension -- that is, when you select 'All Formats,' Illustrator shows all files that can be opened on the basis of file extension (.ai, .eps, .pdf, etc.).
    I tried playing around with the Read-Only and Hidden file attributes, but that made no difference. If you have things set up to show Hidden files in Explorer, they'll show up in AI 10's File | Open dialog.
    This is baffling.

  • Applescript Summarize Command - how to process PDF files?

    I'm stuck in applescript...I'm putting together an applescript that reads a set of PDF files in a folder and returns each PDf file summarized using the applescript summarize command.
    Can't ssem to wrap my head around the logic needed....Any help is much appreciated!

    I come close but need more help
    on run
        choose folder with prompt "Which file would you like  size calculated?"
        open {result}
    end run
    on open user_Choice
        tell application "Finder" to set xx to every file in item 1 of user_Choice
        repeat with a_File in xx
            set tot_size to size of (info for user_Choice)
        end repeat
        display dialog "file size" & size of (info for user_Choice)
    end open
    --size of (info for the_file)

  • Hyperlinks from my MSWord files suddenly don't work because "/FirefoxHTML\Shell\Open\Command" has somehow been added to the end of each URL.

    When I click to open the hyperlink in my Word file, the message I get in Firefox is "The requested URL /submissions.htmlFirefoxHTML\Shell\Open\Command was not found on this server." When I delete that portion of the URL, the website opens fine. What can I do to make the hyperlinks work properly?

    Thanks for the suggestion. I tried it, but it didn't work. The link information is written correctly on the MSWord page. But when I click on it and the Firefox tab opens, the page can't be found because "FirefoxHTML\Shell\Open\Command" has been added to the end of each URL. Might it help if I reset Firefox?

  • エラー Could not complete the Open command because there is not enough memory(RAM).

    Windows 版 Adobe Photoshop CS6 13.0.1(32 ビット)を使用して JPEG 2000 ファイルを開くと、エラー “Could not complete the Open command because there is not enough memory(RAM)”を発生しました。
    詳しい情報:
    http://helpx.adobe.com/jp/photoshop/kb/cq04220115.html
    上記の文書を参考にしてください。

    リンク先に下記のように書かれています。
    追加情報 (Additional Information)
    Photoshop CS6 に付属の JPEG 2000 プラグインに問題があることが確認されています。開発チームは現在、問題の修正に取り組んでいます。
    修正の取り組みはいつまでかかるのでしょうか?
    Photoshop CS5 に付属の JPEG 2000 プラグイン を入れれば直るなら、
    Photoshop CS5 に付属の JPEG 2000 プラグイン配布するのは無理なんでしょうか?

  • Open command for Appleworks Imac G5 OS 10.4.2

    When I use the open command from the file menu it takes 20secs before the document window appears, same when I save as or save for first time.
    Also occurs with Office 2004 applications and other applications but strangely not with "pages trial"

    You have 10.4.11 Macs that iTunes can connect to the iTunes Store???
    I was pretty sure they changed to a minimum of 10.6.8
    Are downloading iTunes 9.2.1 from here...
    http://support.apple.com/kb/DL1056

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

  • Open a command window and send some keystroke to the opened command window

    Hi All,
    I am trying to open command prompt and send some key stroke to that command prompt. Here I am using Robot to send keystroke. But the problem is, the keystrokes are not sent to the prompt. I guess I need to activate progamitically the command prompt to accept the keystrokes . Please find the code below ( as I did).
    try
    String command = "cmd.exe /c start";
    Process child = Runtime.getRuntime().exec(command);
    Robot robot = new Robot();
    Thread.sleep(5000);
    String lol = "indranil";
    for(int i=0;i<lol.length();i++)
    robot.keyPress(lol.charAt(i));
    int g = lol.length() - 1;
    robot.keyRelease(lol.charAt(g));
    catch (Exception e) {}
    I guess I am doing some mistake here while sending the keystroke/openning the command prompt. Can anyone please help me how can I open a command window and send some keystroke to the opened command window. I am in fix.
    Thanks,
    Indranil

    The first thing to do is read the API and examples for the Robot class.
    Also check out this thread with a similar discussion: [http://forums.sun.com/thread.jspa?threadID=5385677]
    The short spoonfed answer - keyPress() and keyReleaseI() do not take chars. Read up on KeyEvent

  • Can I close all layers? or even better, stop illustrator from opening all layers when I open a file?

    I just installed cs6, and when I open files in Illustrator, it opens all of the layers which contain sublayers.  It does this even if all the top-level layers were closed during the previous save.  The files I work with have a large layer-structure, so re-closing the top-level layers every time I open a file wastes a lot of my time.  Can I close all layers at once, or better yet, can I stop Illustrator from opening all of the layers automatically when I load a file?
    If not, then WHY on earth not?  I can't be the only one who opens and closes large files with lots of layers and sub-layers...
    Thanks for your help.
    Edit: I also am noticing this problem is even worse in cs6, because openning and closing individual layers plays a little animation of rotating the triangular arrow before the layer which, cute as it may be, just makes the task of individually closing up all my layers that much more tedious.  Can I turn off that little animation of the triangular arrow when opening and closing layers?

    You can save it as a pdf and when you open that in AI the layers will not be opened even if they have sublayers.
    Not true. Does the same nonsense an .AI file does. Saved as a .PDF, closed Layers/subgroups get opened.
    And no one cares!
    I do. Every other Adobe program with a layering sceme seems to be able to remember that you saved a file with all layers and subs closed. But not this one.
    Maybe someone from the AI development team should ask someone from the Photoshop team how they've managed it.....for decades.

  • Does anybody know why Illustrator will open Solidworks DWG files saved in R2007-2009 version but not version R2010?

    Does anybody know why Illustrator will open Solidworks DWG files saved in R2007-2009 version but not version R2010?

    Evidently Solidworks changed the output of their files to a format that AI cannot interpret. Just backsave in Solidworks to the required version.

Maybe you are looking for

  • Connect to server using VPN and router, then 3rd party software hangs

    I connect to my employer server using *Apani Contivity VPN* software to get email, accessing the internet with FireFox and any of the following devices *NetGear RP614v3, Linksys BEFSR41* routers, as well as a *Belkin F5D5131-5* switch. I can connect

  • How can i deauthrized my 5 pc before the end of a year

    some body stol my 5 pc from office .how can i deauthrized my account before the end of a year?

  • Reg : Strategy 50

    Hi PP Guys, I have business scenario like this Scheduling agreement is created in export plant based on that I am calling a function module and some Program for converting into PIR for the same export plant and exporting in the same export plant and

  • Taxinn configuration in sd from scratch

    can anyone tell me the full configuration of taxinn procedure in sd. Now i created a pricing procedure in ides system. i want to have the tax condition types like vat, sess etc in my pricing procedure. so anyone send me the links or any relevant oss

  • EL support in regular HTML tags?

    Is there something that would support EL-type expressions (${expr})within regular HTML tags? I've looked at JSTL, but it only support expressions within its own tags. But if I, for example, want to provide a dynamic value to a form field, I still hav