View Single Post
Quote:
Originally Posted by Scott M. Neal View Post
how does one get not just a string but an object representing the contents of the cell?
Get a reference to the attribute runs of the text object. Asking for the 'text' property of the object just returns a flat string.

Code:
tell application id "OOut"
	tell front document
		tell first selected row
			tell attribute runs of its topic
				set lstSize to size
				set lstStyle to its style
				set lstText to its text
				set lstFont to font
			end tell
		end tell
	end tell
end tell

set lstProps to {}
repeat with i from 1 to length of lstText
	set end of lstProps to {item i of lstText, item i of lstStyle, item i of lstFont, item i of lstSize}
end repeat
lstProps
There may, however, be a bug in the style property of OO3 text objects, it seems to return a reference to the application rather than to the style.

Worth flagging to the Ninjas through OO3 > Help > Send Feedback especially as the Applescript interface is presumably being re-written for OO4.