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

Pop-up despite setting updateLegacyText to 'true'

New Here ,
Mar 13, 2017 Mar 13, 2017

Copy link to clipboard

Copied

Hi there,

My scripted Illustrator workflow involves working with a lot of files with legacy text. The script I use to open these files creates an OpenOptions() object, to which updateLegacyText is set to true.

var fileRef = File("c:\script_path\myfile.ai")

var optRef = new OpenOptions();

optRef.updateLegacyText = true

var docRef = open(fileRef, "null", optRef);

When I run this script using ExtendScript Toolkit, no problem -- the file opens and all the legacy text is updated.

However, when I run the script from the command prompt...

illustrator.exe -run c:\script_path\my_script.jsx

Everything works EXCEPT I still get a pop-up asking whether or not I want to open legacy text.

This may seem like a small inconvenience, but it means that this process cannot be fully automated. If I need to process dozens of files, I would need to be present to click "Okay" at each pop-up.

I find this behaviour odd, since it works fine when run from the ExtendScript Toolkit. Is anyone aware of this problem? I am using the latest version of Adobe CC 2017.

Thank you very much for any help you can provide

TOPICS
Scripting

Views

293

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

Community Expert , Mar 14, 2017 Mar 14, 2017

Try including:

app.userInteractionLevel(UserInteractionLevel.DONOTDISPLAYALERTS);

Votes

Translate

Translate
Adobe
Community Expert ,
Mar 14, 2017 Mar 14, 2017

Copy link to clipboard

Copied

Try including:

app.userInteractionLevel(UserInteractionLevel.DONOTDISPLAYALERTS);

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
New Here ,
Mar 16, 2017 Mar 16, 2017

Copy link to clipboard

Copied

Yes! That worked. Although formatting is:

app.userInteractionLevel = UserInteractionLevel.DONTDISPLAYALERTS

Thank you very much!

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 ,
Mar 16, 2017 Mar 16, 2017

Copy link to clipboard

Copied

LATEST

gah, you're right. the documentation doesn't have an example and it's been a long time since i used it so i took a shot in the dark..

Glad you were able to get it working. 😃

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