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

find object method in the official adobe API

Explorer ,
Sep 17, 2016 Sep 17, 2016

Copy link to clipboard

Copied

Hi

i see i nthe forum some link to ps-scripts Homepage  so i think the adobe forum is not the only efficient way to find information.

I need to have acces to all the color in the swatche to retrieve the name and color value for export .

I read in the internet a javascript file with this  code

...  var doc = app.documents;

.....doc.swatches.length);

.....doc.swatches[random_num];

Then i go to the Adobe library page  here and i open  Photoshop cs6 javascript ref.pdf

In chapters

-Javascript Objetc Reference

---Document  ( Documents is a collection of open Document objects)

------Properies

------Methods

And i don't see the term swatches in the pdf neither in the sub chapter ( see below) !!

Does it mean it is not available in the CS6 version of photoshop ?

I really thing it is really a shame that the object Model of photoshop CS6 is not available to script when see

young Gis manifold Software that support outstanding Object documention and GPU .

Now i need to export "aco" and parse the file to convert it to new formated contents ......really cumbersome !!!

Thank's

TOPICS
Actions and scripting

Views

371

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
Adobe
Advisor ,
Sep 17, 2016 Sep 17, 2016

Copy link to clipboard

Copied

LATEST

i see i nthe forum some link to ps-scripts Homepage  so i think the adobe forum is not the only efficient way to find information.

That site is a PS/JS (retired) developer (me) who hosts xtools, CSX, and Image Processor Pro there.  A better link to work with is https://sourceforge.net/projects/ps-scripts/  then go to Files to get the downloads.

I read in the internet a javascript file with this  code

...  var doc = app.documents;

.....doc.swatches.length);

.....doc.swatches[random_num];

That code was for InDesign JS. PS/JS Document does not have a swatches property in any version of PS. xtools/xlib/ColorSwatches.jsx has code for reading and writing ACO files in PS/JS and fiddling with swatches. All of the bits that you need should be there.

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