Copy link to clipboard
Copied
How can I change the colour picker fill and stroke to another colour via script?
CHAPTER 1: JavaScript Object Reference
Page 43
Creating a document with defaults
// Creates a new document if none exists
// then sets fill and stroke defaults to true
if ( app.documents.length == 0 ) {
doc = app.documents.add();
} else {
doc = app.activeDocument;
}
doc.defaultFilled = true;
doc.defaultStroked = true;
*****
//With that read I pushed app.activeDocument to a variable.
var aaadoc = app.activeDocument;
// then looked in the databrowser.
// here you can see we have access to quite a few o
...Copy link to clipboard
Copied
Qwertyfly...​ any ideas on this?
Copy link to clipboard
Copied
CHAPTER 1: JavaScript Object Reference
Page 43
Creating a document with defaults
// Creates a new document if none exists
// then sets fill and stroke defaults to true
if ( app.documents.length == 0 ) {
doc = app.documents.add();
} else {
doc = app.activeDocument;
}
doc.defaultFilled = true;
doc.defaultStroked = true;
*****
//With that read I pushed app.activeDocument to a variable.
var aaadoc = app.activeDocument;
// then looked in the databrowser.
// here you can see we have access to quite a few options for the default fill and stroke.
// these will effect your default swatch in the color panel.
// if you have anything selected when you tweek these values, it will effect your selection!
Hope that helps
Copy link to clipboard
Copied
Worked like a charm!
Copy link to clipboard
Copied
glad I could help.