Re: add resource
Re: add resource
- Subject: Re: add resource
- From: John Delacour <email@hidden>
- Date: Mon, 19 Aug 2002 23:47:40 +0100
At 3:07 pm -0700 19/8/02, Matthew Galaher wrote:
It is not uncommon in my work flow to come across files that have no
resource fork or have had it killed by a non mac process (ftp'd by someone
out of my control for example). I'm interested in an OS 9 Apple Script
droplet that would let me drop multiple files and have the resource fork
added to the files. I don't know much about this area, and although I came
across the 'add resource' scripting addition I have not been able to get it
working. Would anyone be kind enough to outline an example?
There are a number of osa extensions that will do this, but the only
one currently available for both OS X and earlier OS is the Satimage
osax
<
http://www.satimage-software.com/>
Here is an example:
set f to "" & (path to +constant afdrdocs;) & "junk.txt"
open for access file f
close access file f
put resource "hello" to file f type "TEXT" index 128
tell app "ResEdit" to open file f -- just to see
I'm hoping that I can find some example that I can edit so that I
can add the ability to choose creater and file type in a dialog. But
currently I'm stumped on how to get the resource fork added to a
file.
I don't quite follow this. A file needs no resource fork in order to
have a file type and creator type...
set f to "" & (path to +constant afdrdocs;) & "junk.owt"
open for access file f
close access file f
tell application "Finder"
tell file f to set {file type, creator type} to {"????", "owt_"}
end tell
[ ... but junk.owt still has no resource fork. ]
JD
_______________________________________________
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.