How to use Parameterized Attributes
Closed this issue · 0 comments
iSapozhnik commented
First of all I'd like to thank you for all that work you have done! It really simplifies dealing with Accessibility API.
What I'm trying to do is following. I'd like to change foreground and background color of some text inside NSTextView of some app. From my understanding I should use NSAttributedString (at least that is what I'm getting when I try to read parameters of the text by using AXAttributedStringForRangeParameterized). But I can't really get how to construct my object that I then should pass to setAttribute
method. I would assume that I need to specify range of text, the text itself and parameters, which in my case are AXForegroundColorText
and AXBackgroundColorText
.
Could you please help me?