• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Read RTF in OS X?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Read RTF in OS X?


  • Subject: Re: Read RTF in OS X?
  • From: Jason Bourque <email@hidden>
  • Date: Mon, 22 Apr 2002 09:11:20 -0400

Mr Tea,

Thanks, that makes sense.


Thanks,

Jason Bourque
Co-Director Boston AppleScript Users Group




On 4/22/02 7:52 AM, "Mr Tea" <email@hidden> wrote:

> set theRTF to [a suitable item]
> tell application "TextEdit"
> open theRTF
> set theText to every paragraph of text of document 1 as text
> end tell
>
> One thing that I've found when doing this is that if I send the contents of
> the variable to the clipboard for pasting into a document elsewhere, the
> pasted text contains the 'wrong kind' of return characters. I knocked up the
> following routine to fix that:
>
> set ASTIDs to AppleScript's text item delimiters
> set AppleScript's text item delimiters to ASCII character 10
> set someParas to every text item of theText
> set theParaStore to {}
> repeat with thePara in someParas
> set the end of theParaStore to (thePara & return)
> end repeat
> set AppleScript's text item delimiters to ASTIDs
> set the clipboard to theParaStore as text
>
>
> Mr Tea
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.

References: 
 >Re: Read RTF in OS X? (From: Mr Tea <email@hidden>)

  • Prev by Date: Quark Scripting problem
  • Next by Date: Re: applescript-users digest, Vol 3 #374 - 5 msgs
  • Previous by thread: Re: Read RTF in OS X?
  • Next by thread: Re: Read RTF in OS X?
  • Index(es):
    • Date
    • Thread