Load resource

I just found this cool code:

set TheBrokenAlias to "path:to:your:alias"
load resource 0 type "alis" from file TheBrokenAlias

This loads 0 type “alis”. Is there any list which lists everything that can be loaded like this?


‘load resource’ is a command from the Satimage OSAX. When applied to a working ‘alias file’ (in Finder terminology), it returns an alias (AppleScript terminology) to the original item. When applied to an alias file whose original item is missing, the object returned is something specified by the keyword ‘alias’ followed by a POSIX path to the missing item. Coercing this object to text returns a POSIX path. Interestingly, trying to get text using the command’s ‘as’ parameter returns a data object of type "obj " instead.

If I recall correctly, ‘load resource’ can also be used to read text clippings and webloc files.

Resources generally. You’d be surprised where they can pop up…

Thanks. This sounds cool, but i have no idea what resources are available. Any list of resources in Apple Documentation or else where?

It’s not really something to use for fishing expeditions – it’s a way of getting at a resource in a file if you need to. Most uses of resources aren’t documented.