Adam Morris wrote:
>In Applescript, I would write the following:
> tell app "Pages" to tell front document to get its selection -- text from
> character x to character y
>>> app('Pages').documents[1].selection.get()
or just
>>> app('Pages').documents[1].selection()
app(u"/Applications/iWork
'09/Pages.app").documents.ID(13779112).body_text.text[app.documents.ID(13
779112).body_text.characters[95]:app.documents.ID(13779112).body_text.cha
racters[1681]]
>tell app "Pages" to tell front document to get its selection as text --
> "whatever is selected"
>>> app('Pages').documents[1].selection()()
u'Lorem ipsum dolor sit amet, [...]'
(Tested with Pages '09 and appscript 0.21)
--
Ned Deily,
[email protected]
_______________________________________________
Pythonmac-SIG maillist - [email protected]
http://mail.python.org/mailman/listinfo/pythonmac-sig