Hello,
I started writing PScripts this very day coming from a 15+ Years Background in Flash/ActionScript Development and FrontEnd/JS Programming.
After extensive searching both in the Script Reference and other Documentation I was unable to confirm wether or not its possible to at least retrieve a layers color label (Red, Orange, Yellow, None etc) given by the Author in the Layer Panel.
This would be extremely useful.
Thanks for any hints
Read Layer's Color Label
-
- Posts: 26
- Joined: Mon Aug 01, 2016 8:59 pm
Re: Read Layer's Color Label
Hi,
you can try this one:
Have fun
you can try this one:
Code: Select all
var ref = new ActionReference();
ref.putEnumerated( charIDToTypeID("Lyr "), charIDToTypeID("Ordn"), charIDToTypeID("Trgt") );
var desc = executeActionGet(ref);
alert ( typeIDToStringID(desc.getEnumerationValue( stringIDToTypeID('color')) ));
Re: Read Layer's Color Label
Thank you! Useful!
Green label returns 'grain'
Green label returns 'grain'