I have a script (in OS 9) that adds custom meta data to the text resource fork of a file using the Resource IO osax… I thought it would be great to get this working on OS X… but the osax doesn’t want to work! Does any one know of a way to do this on OS X? Even a non AppleScript way?
OS 9 osaxen will not work in OSX. You may be able to use David Lloyd’s X-Commands. It has some resource commands example scripts, plus several other goodies.
Here’s the Resource section of the Satimage OSAX dictionary:
Resource Suite : Utilities to read and write resources from/to a file.
load resource : get the resource of the given type and id from the specified file
load resource small integer -- index of the desired resource
type type class -- type of the desired resource
from file specification -- file to read from
[as type class] -- an AppleScript type for the returned result
Result : anything -- any AppleScript data that is stored in the resource: data, object specification, reference, etc.
list resources : return the list of the ids of the resources of the specified type stored in the specified file
list resources type class -- type of desired resources
from file specification -- file to read from
Result : anything -- the list of ids
get resource name : return the name of the resource of the specified type and id from the specified file
get resource name small integer -- index of the desired resource
type type class -- type of the desired resource
from file specification -- file to read from
Result : anything -- the name of the resource
put resource : write the given resource to the specified file with specified type and id
put resource anything -- the AppleScript data that will be stored in the resource
to file specification -- the destination file
type type class -- the resource type
index small integer -- the resource id
[with name string] -- the resource name
Disclaimer: I am not affiliated in any way whatsoever with Satimage, other than thinking they make great free software.