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
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
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!
Copy link to clipboard
Copied
Hi JavierAroche,
It is working like charm..
-yajiv