Copy link to clipboard
Copied
I've written an applescript to count the words in a document from a list of documents. Sometimes, a window opens showing there are fonts missing and sometimes it asks if I want to link missing art. I don't care about these windows and would like to close them automatically if they appear. Is there a command to close these? Otherwise, the script doesn't run automatically because of the open windows. I have to close them before it opens the next file.
Or even a command to ignore warning messages.
I appreciate any help I can get.
I'm a Javascript man myself, so you'll have to translate this to Applescript, but the command you're looking for is:
app.scriptPreferences.userInteractionLevel = UserInteractionLevels.NEVER_INTERACT;
Just make sure to set this back to:
app.scriptPreferences.userInteractionLevel = UserInteractionLevels.INTERACT_WITH_ALL;
when the script finishes!
HTH,
Ariel
Copy link to clipboard
Copied
I'm a Javascript man myself, so you'll have to translate this to Applescript, but the command you're looking for is:
app.scriptPreferences.userInteractionLevel = UserInteractionLevels.NEVER_INTERACT;
Just make sure to set this back to:
app.scriptPreferences.userInteractionLevel = UserInteractionLevels.INTERACT_WITH_ALL;
when the script finishes!
HTH,
Ariel
Copy link to clipboard
Copied
Moving discussion to InDesign Scripting forum
Copy link to clipboard
Copied
Thanks. I'll see if I can figure it out from your commands. I was originally going to write it in Javascript but I had to run Excel and InDesign together.
Copy link to clipboard
Copied
Thanks. The command was
set user interaction level of script preferences to never interact
Copy link to clipboard
Copied
Stick to js as much as you can. When you need to call excel with applescript, use doScript and only for that