check style of text layer through scripting
Hi,
is there a way to check if a text layer has only one style formatting in it through scripting?
As far as I know getStyleAt() works only with expressions, not in scripting right? Looking through scripting PDF and looking at TextDocument properties and methods it all works based only on first character of layer and i dont see any way to adress specific character in a way like getStyleAt() does in expressions, but for scripting.
The only way I can think of right now how to check it through scripting is to:
add a checkbox control to layer
set a expression to it to loop through individual characters with getStyleAt() and compare those
set its value through expression based on comparison
get the value of checkbox control through scripting
delete the checkbox control
But this looks overcomplicated to me and I am not even sure if this would work, if there isnt some limitation I am not thinking of.
Isnt there a simpler way of doing this?
Thank you for help
