Trying to suppress alerts while running a batch action
So I've written a simple Action to expand the artboard to enclose all objects. Seems to work just fine. Ran it on a small folder of my AI files as a Batch to test it. Works great. The only issue is that if one of my AI documents contains an image (JPG usually), the Batch pauses and I get an alert box saying "Could not find the linked file…" and it names the missing JPG and gives me options to Replace, Ignore, or Cancel. I went ahead and selected "Apply to All" and clicked "Ignore," and the Batch proceeds cleanly with that particular file. But then I get that alert on every other file it comes across that has a missing image. I did a little searching, and found this thread: https://community.adobe.com/t5/illustrator-discussions/prompt-alert-is-stopping-a-batch-action/m-p/10949147 which looked really promising. The solution proposed there is from this thread: https://community.adobe.com/t5/illustrator-discussions/save-amp-close-alert-dialogue/m-p/10924804#M166201 which suggests adding a line to the Action that runs a simple script that just contains the line
UserInteractionLevel.DONTDISPLAYALERTS;I've never done any scripting in Illustrator, but I gave it a shot. Took me a few tries to get the script recognised by Illustrator, but I think I finally got it in the right format (plain text) and the right file extension (.jsx) so that it shows up in Illustrator's Scripts menu. I used the Insert Menu Item command in the Actions panel to add that script to the first line of my Action, and tested the Batch again. I still get the "Could Not Find the Linked File" alert pausing the Action. So I did some more searching and found that somebody else was using the script
app.userInteractionLevel = UserInteractionLevel.DONTDISPLAYALERTS;so I tried that instead, and still got the alert that paused my Action.
So is there any way to suppress this alert while running my Batch Action? I've got about 4GB of files I need to apply this action to, and it'd be a lot easier and quicker if I didn't have to sit and acknowledge every alert box.
Thanks for your suggestions!
