Just a heads up. I struck a problem where, with ASObjC, when opening Illustrator CC with missing Fonts, a dialog comes up that is supposedly untrappable.
Took me several hours, but I’ve found a solution, below.
Santa.
tell application id "com.adobe.illustrator" -- Adobe Illustrator
try
activate
# set user interaction level to never interact
set user interaction level to interact with all
repeat until the (count of documents) is 0
close every document saving no
end repeat
set addBarCode to false
set my theItem to my theItem as alias
try
tell application "System Events" to tell process "Adobe Illustrator"
try
keystroke return
end try
end tell
activate
set theDwell to 16
set theStartTime to current date
with timeout of theDwell seconds
try
open my theItem dialogs no
end try
end timeout
if (current date) - theStartTime > theDwell - 1 then
set The_app to "Adobe Illustrator" as text
try
tell application "Finder"
tell application "System Events" to set pid to the unix id of process The_app as Unicode text
do shell script "kill " & pid
end tell
end try
my transferMessage(currentMailItem, "* items to manually process")
tell current application to say ("We may have struck an Illustrator file with miss matched fonts. It has been moved to the mail box items to manually process")
end if
-- as alias (don't use 'as alias' or routine won't work)
on error errmsg number errnum
tell application "System Events" to display dialog "setup 1 " & errmsg
end try
repeat 2 times
tell application "System Events" to tell process "Adobe Illustrator"
try
click button "Continue" of window 1
end try
try
keystroke return
end try
end tell
end repeat