• 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
Cocoa Text Storage Scripting
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Cocoa Text Storage Scripting


  • Subject: Cocoa Text Storage Scripting
  • From: Jim Correia <email@hidden>
  • Date: Sun, 29 Jan 2006 11:15:16 -0500

I'm experimenting with TextEdit.

If document 1 contains a string with styles and attachments, the following will copy the rich content into document 2:

tell application "TextEdit"
	set x to a reference to text of document 1
	set text of document 2 to x
end tell

The following will lose the styles and attachments:

tell application "TextEdit"
	set x to text of document 1
	set text of document 2 to x
end tell

The former is an ok workaround as long as I am staying within the same application. But how do I move rich text between apps via applescript? Is there an rtfd AE type? Should Cocoa be using it automtically?

Thanks,
Jim

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Prev by Date: Re: Enabling Standard AppleScript Support with Cocoa App
  • Next by Date: NSFileContentsPboardType - when should it be used?
  • Previous by thread: Re: -[NSAttributedString initWithPasteboard:...] vs. Dictionary
  • Next by thread: NSFileContentsPboardType - when should it be used?
  • Index(es):
    • Date
    • Thread