Get file path for preloaded Color Setting
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
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.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!
Already have an account? Login
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.