Simon Fell > Its just code > Entourage scripts menu need resource forks

Saturday, January 6, 2007

I burnt way too many hours tracking this one down, so hopefully this'll help someone else. Like a lot of Mac apps, Entourage has a scripts menu, drop a compile applescript file (.scpt) file into the Documents/Microsoft User Data/Entourage Script Menu Items and they'll magically appear in the scripts menu. However because the current Entourage version is from 10.2.8 days, it requires the script files to have a resource fork, that's not a problem if you're writing them directly with script editor, but if you're trying to use the XCode compile apple script build phase, or even just having the .scpt files copied into your built resources directory, then by default XCode will strip out the resource forks, making them useless to Entourage. It took me a way too much time to work that out, once i did, then I quickly found the preserve HFS data option in the xcode project to have xcode copy the scpt's into the resources folder preserving the resource fork. Now back to doing some actually useful work.