Applescript to update legacy text

I am trying to use a variation of this script from the “Adobe Illustrator CS Scripting Guide” in a longer script.

tell me
activate
set theFile to choose file with prompt “Choose file with Legacy Text:”
end tell
tell application “Illustrator CS”
activate
open theFile with options {update legacy text:true}
end tell

My impression is after choosing the file with legacy text, the file should open with no further user interaction. Instead, after choosing the file from the prompt, it brings up the open dialog box where I again have to choose the file and then brings up the update legacy text dialog where I have to choose “Update”.

If I set user interaction to never, it doesn’t bring up any dialogs, but it doesn’t update legacy text and brings up the warning that I haven’t updated.

I also tried to use the force command, but I may not have been scripting it properly

Any help will be greatly appreciated.

Jim Daggett

Your impression is correct. It should. I suspect Illustrator does this because the options are set, as when I tested it without the options, Illustrator opened the file without a problem.

Since Illustrator offers a “without dialogs” option as well, try it:

open theFile with options {update legacy text:true} without dialogs

Thanks, I will give that a try.

open aFile with options {update legacy text:true} without dialog



When I tried this, the compiler treated "dialog" as a variable. Any other thoughts?

How can I put this delicately? The Illustrator dictionary and my post list the proper phrase as

without dialogs

note that this is not

without dialog

Let me know if it still doesn’t work when the option is spelled correctly, as it works on my machine.