Re: text file with resource fork
Re: text file with resource fork
- Subject: Re: text file with resource fork
- From: JJ <email@hidden>
- Date: Fri, 23 Mar 2001 09:52:19 +0100
>
Message: 4
>
Date: Thu, 22 Mar 2001 09:27:18 -0800
>
To: email@hidden
>
From: Jeff Ganyard <email@hidden>
>
Subject: text file with resource fork
>
>
Hi all,
>
>
Is there a plain vanilla solution to creating a new text file that
>
has a resource fork? I'm using read/write commands and it works fine,
>
but the app that end sup importing the resulting file complains if
>
the text file does not have a resource fork. The file is being
>
generated from a remote FileMaker db so keeping a blank file around
>
would be unreliable.
>
>
tia,
>
jeff
Re-Hi:
I think read/write commands only read & write data fork.
"Save resource" command, from Akua Sweets, (above) saves a resource of type
"TEXT" and ID 128 (default ID) in your text file with size (number of
characters). +Save resource "y"; should be 1 byte (character "y").
tell application "Finder"
set newfile to make file -- with properties (...)
-- YOUR SCRIPT
save resource "y" in newfile
end tell