Re: (standard additions) read file as styled text
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