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

Window interrupting Automation

Explorer ,
Jun 18, 2024 Jun 18, 2024

Copy link to clipboard

Copied

Hey y'all!


I'm looking to create a process that utilize external methods like Node.JS to monitor folders and execute scripts in Illustrator. Below was my first test and I ran into a roadblock almost instantly. Just using Python, I ran into the popup below.

 

Kernzy_0-1718726706139.png

I tried to silence the popup using 'app.userInteractionLevel = UserInteractionLevel.DONTDISPLAYALERTS;' and that does not seem to be helping. Anyone have any ideas on how to bypass this window?

Python:

 

import subprocess
subprocess.run(['C:\\Program Files\\Adobe\\Adobe Illustrator 2024\\Support Files\\Contents\\Windows\\Illustrator.exe', 'C:\\Program Files\\Adobe\\Adobe Illustrator 2024\\Presets\\en_US\\Scripts\\PythonTest.jsx'])

 


Extendscript:

 

app.userInteractionLevel = UserInteractionLevel.DONTDISPLAYALERTS;
alert('Hello world');
app.userInteractionLevel = UserInteractionLevel.DISPLAYALERTS;

 

 

TOPICS
Scripting

Views

154

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 , Jun 18, 2024 Jun 18, 2024

You need to set the below preference before running the script for each machine...

app.preferences.setBooleanPreference("ShowExternalJSXWarning", false);

 

I tested it on a Mac with the below scripts and works just fine.

# test.py

import subprocess

prog = "/Applications/Adobe Illustrator 2024/Adobe Illustrator.app"
jsx_file = "/Users/jbd/Desktop/test.jsx"

subprocess.run(["open", "-a", prog, jsx_file])

 

// test.jsx

alert("hello from jsx!")

 

Votes

Translate

Translate
Adobe
Engaged ,
Jun 18, 2024 Jun 18, 2024

Copy link to clipboard

Copied

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 ,
Jun 18, 2024 Jun 18, 2024

Copy link to clipboard

Copied

LATEST

You need to set the below preference before running the script for each machine...

app.preferences.setBooleanPreference("ShowExternalJSXWarning", false);

 

I tested it on a Mac with the below scripts and works just fine.

# test.py

import subprocess

prog = "/Applications/Adobe Illustrator 2024/Adobe Illustrator.app"
jsx_file = "/Users/jbd/Desktop/test.jsx"

subprocess.run(["open", "-a", prog, jsx_file])

 

// test.jsx

alert("hello from jsx!")

 

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