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

Changing the colour picker to another colour via script

Community Beginner ,
Mar 31, 2017 Mar 31, 2017

How can I change the colour picker fill and stroke to another colour via script?

TOPICS
Scripting
1.1K
Translate
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

Guide , Apr 03, 2017 Apr 03, 2017

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.

db.PNG

// here you can see we have access to quite a few o

...
Translate
Adobe
Community Beginner ,
Apr 03, 2017 Apr 03, 2017

Qwertyfly...​ any ideas on this?

Translate
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
Guide ,
Apr 03, 2017 Apr 03, 2017

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.

db.PNG

// 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

Translate
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 Beginner ,
Apr 04, 2017 Apr 04, 2017

Worked like a charm!

Translate
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
Guide ,
Apr 04, 2017 Apr 04, 2017
LATEST

glad I could help.

Translate
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