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

Get file path for preloaded Color Setting

Engaged ,
Jan 06, 2017 Jan 06, 2017

Copy link to clipboard

Copied

Hi

I tired a lot and having the headache due to finding the file path for loaded color setting.

First I know, is this possible to get loaded color setting path?

Please suggest me.

-yajiv

TOPICS
Actions and scripting

Views

667

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

correct answers 1 Correct answer

Participant , Jan 07, 2017 Jan 07, 2017

Hey natrev​, try this:

var ref = new ActionReference();

ref.putProperty( stringIDToTypeID("property"), stringIDToTypeID("colorSettings") )

ref.putEnumerated( charIDToTypeID("capp"), charIDToTypeID("Ordn"), charIDToTypeID("Trgt") ); 

var appDesc = executeActionGet(ref);

var colorSettingsObject = appDesc.getObjectValue( stringIDToTypeID('colorSettings') );

var colorSettingsPath = undefined;

if( colorSettingsObject.hasKey( stringIDToTypeID('using') ) ) {

     colorSettingsPath = colorSettingsObject.getPa

...

Votes

Translate

Translate
Adobe
Participant ,
Jan 07, 2017 Jan 07, 2017

Copy link to clipboard

Copied

Hey natrev​, try this:

var ref = new ActionReference();

ref.putProperty( stringIDToTypeID("property"), stringIDToTypeID("colorSettings") )

ref.putEnumerated( charIDToTypeID("capp"), charIDToTypeID("Ordn"), charIDToTypeID("Trgt") ); 

var appDesc = executeActionGet(ref);

var colorSettingsObject = appDesc.getObjectValue( stringIDToTypeID('colorSettings') );

var colorSettingsPath = undefined;

if( colorSettingsObject.hasKey( stringIDToTypeID('using') ) ) {

     colorSettingsPath = colorSettingsObject.getPath( stringIDToTypeID('using') );

}

If you have a loaded color setting, the variable colorSettingsPath will return the path to the file, otherwise it will return undefined.

Hope it helps!

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
Engaged ,
Jan 08, 2017 Jan 08, 2017

Copy link to clipboard

Copied

LATEST

Hi JavierAroche,

It is working like charm..

-yajiv

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