• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

InDesign and applescript

Explorer ,
Jul 27, 2017 Jul 27, 2017

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.

TOPICS
Scripting

Views

610

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

People's Champ , Jul 27, 2017 Jul 27, 2017

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

Votes

Translate

Translate
People's Champ ,
Jul 27, 2017 Jul 27, 2017

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

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jul 27, 2017 Jul 27, 2017

Copy link to clipboard

Copied

Moving discussion to InDesign Scripting forum

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Jul 27, 2017 Jul 27, 2017

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.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Jul 27, 2017 Jul 27, 2017

Copy link to clipboard

Copied

Thanks. The command was

set user interaction level of script preferences to never interact

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
People's Champ ,
Jul 27, 2017 Jul 27, 2017

Copy link to clipboard

Copied

LATEST

Stick to js as much as you can. When you need to call excel with applescript, use doScript and only for that  

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines