Change Illustrator Color Settings on MacOS with JavaScript/ExtendScript?
Question:
Is there a way to set the Color Settings in Illustrator on MacOS with ExtendScript via the Document Preset so those color settings will be applied at the creation of the new document?
Use Case:
I have an Illustrator ExtendScript that will import images and arrange them on a layout along with specific metadata. In most cases, all of the images being placed should be tagged with the same profile. I'm grabbing the profile associated with the first image and would like to set the Color Settings to the settings associated with that profile (which I know) before I create the document to avoid profile mismatch warnings when placing the images.
MacOS Testing:
In simplied terms for testing, was thinking something like the following may work, but it's not changing the settings:
var myColorSettings = "North America Newspaper";
var docPreset = new DocumentPreset;
docPreset.colorSettings = myColorSettings;
var doc = app.documents.addDocument(DocumentColorSpace.CMYK, docPreset);
I also I tried the following variations of myColorSettings as well with no success:
- ~/Library/Application%20Support/Adobe/Color/Settings/Recommended/North%20America%20Newspaper.csf
- /Library/Application%20Support/Adobe/Color/Settings/Recommended/North%20America%20Newspaper.csf
- North%20America%20Newspaper.csf
- North%20America%20Newspaper
- North America Newspaper.csf
- North America Newspaper
Any ideas how to accomplish this?
