I’m an application developer, currently making iClip scriptable.
iClip can record clipboard contents. These contents may contain pictures or text. Sometimes, the text is styled.
Now I wonder how I should make such styled text available to Applescript users so that they can get and set the styled text.
Currently, there is a “Clipping” class that has the property “text content” with type “text”. Problem is that I can only take plain text thru this property.
See this code:
set stxt to "Styled string" as styled text
tell first clipping
set text content to stxt
end tell
That only sends the plain text part to my application.
How can I make my app accept both plain and styled text, and possibly deliver it as well? I’m using “Sdef Editor” to write my vocabulary and it does not offer any alternative types such as “rich text” or “string”, but maybe the work regardless. Ideally, I’d like to work with NSAttributedString on my app’s side.
Any pointers?