• 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: (standard additions) read file as styled text
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: (standard additions) read file as styled text


  • Subject: Re: (standard additions) read file as styled text
  • From: Christopher Nebel <email@hidden>
  • Date: Mon, 23 Apr 2001 22:08:14 -0700

On Monday, April 23, 2001, at 06:01 AM, Brennan Young wrote:

I'm trying to use the standard additions file commands for reading a
styled text document.

Unfortunately when I try (read o as styled text) I get a 'parameter
error'. What's up with that? I thought styled text was a core
Applescript class.

Well, yes, but it doesn't have a particularly well-defined file format, and it definitely doesn't have one that only uses the data fork, which is all read/write knows about. The best you can do using only standard additions is to get the plain text of the file. Getting the styles would involve (assuming the file is in SimpleText styled format) digging the 'styl' resource out of the resource fork and combining it with the raw text. I'm sure there are some scripting additions that will let you do this, but I don't know what they are.


--Chris Nebel
AppleScript Engineering


  • Follow-Ups:
    • Re: (standard additions) read file as styled text
      • From: Brennan Young <email@hidden>
References: 
 >(standard additions) read file as styled text (From: Brennan Young <email@hidden>)

  • Prev by Date: Reading nested lists from a preference file
  • Next by Date: Re: Event GURLMAIL
  • Previous by thread: (standard additions) read file as styled text
  • Next by thread: Re: (standard additions) read file as styled text
  • Index(es):
    • Date
    • Thread