With the Finder (Get Info), you can change the application a file is opened with. Is it possible to script this so I can make a file always open with a specific app? There doesn’t seem to be any Finder property. I’m not sure if this info is stored as the creator code or in the resource fork?
I’ve been testing and seems it creates a new resource-fork resource named “usro” (I guess it stands for “user options” or something similar). It creates also a “icns” for the related app’s icon, but it isn’t needed for the basic funcionality.
I did a test: copy-paste this resource in a different file. And it opened with the related app.
So, you may need, probably:
-Satimage.osax, to insert the relevant “usro” resource (and “icns”, if you wish), if your file contains itself some resource-fork info.
-A simple “do shell script” call to insert this resource-fork in your file, if it’s a plain datafork file. Eg:
do shell script "cp /filecontainingtherelevantresource_usro/rsrc /targetdataforkfile/rsrc"