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