Skip to main content
Inspiring
May 24, 2023
Answered

Illustrator 2023 - Javascript documentation

  • May 24, 2023
  • 4 replies
  • 1455 views

Hi all,

 

I'm trying to create a little script to setup certain preferences in Illustrator as I have done with Indesign and Photoshop. For some reason, I'm really struggling to find any javascript documentation anywhere for Illustrator, and when I do, it doesn't contain the specific properties I'm trying to manipulate... Any help would be hugely appreciated!

 

Cheers,


Sam

This topic is closed to new replies. Start a new post to keep the conversation going.
Correct answer Sergey Osokin

Use these methods to change boolean settings.

// true - Rich Black, false - All Blacks Accurately
app.preferences.setBooleanPreference('blackPreservation/Onscreen', false);
app.preferences.setBooleanPreference('blackPreservation/Export', false);

 

4 replies

m1b
Community Expert
Community Expert
May 24, 2023

Hi @SpaghettiSam, here's some documentation. You could also have a look at this script by @Ten A.

- Mark

Inspiring
May 24, 2023

Thanks for the response @m1b !

 

So, the particular property I'm looking for is regarding the display of the colour black as shown in the attached screenshot. I couldn't seem to find this property within the documentation you supplied, however, managed to pinpoint this in the script you supplied...

"blackPreservation/Onscreen",
"blackPreservation/Export"

 

The InDesign equivalent I've setup for this particular property is:

var myDoc = app.activeDocument;

	app.colorSettings.idealizedBlackToScreen = false;
	app.colorSettings.idealizedBlackToExport = false;


Is there anyway I could mimic what I've setup in InDesign, keeping it nice and simple?

 

Cheers,


Sam

Sergey Osokin
Sergey OsokinCorrect answer
Inspiring
May 26, 2023

Use these methods to change boolean settings.

// true - Rich Black, false - All Blacks Accurately
app.preferences.setBooleanPreference('blackPreservation/Onscreen', false);
app.preferences.setBooleanPreference('blackPreservation/Export', false);