On Jun 8, 2009, at 6:13 PM, Christopher Suckling wrote:

> Dear All,
>
> With Skim 1.22, the AppleScript:
>
>  tell application "Skim"
>     set theDoc to front document
>     set theSelection to selection of theDoc
>     set theContent to get text for theSelection
>  end tell
>
> returns:
>
>  rich text of rich text format
>  "sdfsdjfskdfhskjdfksdhfiusgfsgfdfkd" of application "Skim"
>
> If my memory serves me correctly, "get text" used to return plain  
> text.
> Is it still possible to achieve this behaviour or can someone point me
> in the right direction to deal with the rich text.
>
> Many thanks,
>
> Christopher

This has indeed changed, though in version 1.2.1 (see the release  
notes). It allows you to get style information from the text as well,  
something that did not work previously. You can get the plain text by  
adding "as text" to the statment, you my need to add appropriate  
parenthesis to guide AppleScript. You can also force an evaluation of  
the text by adding a "contents of" before the statement.

Christiaan


------------------------------------------------------------------------------
Crystal Reports - New Free Runtime and 30 Day Trial
Check out the new simplified licensing option that enables unlimited
royalty-free distribution of the report engine for externally facing 
server and web deployment.
http://p.sf.net/sfu/businessobjects
_______________________________________________
Skim-app-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/skim-app-users

Reply via email to