October 20, 200421 yr (OS X only) I got this idea to hide my four-file database, along with a few shell scripts and other "resources", down inside an Applescript that has been saved as an application bundle. Specifically, I created an Applescript that simply tells the Finder to open the master FM file (see below); saved the Applescript as an application bundle; opened the package contents and drilled down into Contents:Resources: and put my folder in there. The client can no longer accidentally open the wrong file at startup (in fact he doesn't even have to know about database files at all). I can create an icon with his logo and affix it to the Applescript, as a nicety. There must be a number of other little goodies that can be done. What I'm wondering is, has anybody done this, are there any cautions or drawbacks to be aware of, and what are some other neat things that can be done with this sort of packaging? Thanks, Chap -- Script to open master database file, stored internally -- property pFMAppResources : "Contents:Resources:FMfiles:" property pFMMasterFile : "People.fp5" global gPathToMaster set gPathToMaster to (path to me as string) & pFMAppResources & pFMMasterFile try tell application "Finder" to open file gPathToMaster on error errMsg display dialog "Problem launching " & gPathToMaster & return & return & errMsg error errMsg end try
October 21, 200421 yr Author Just to follow up for the record: It works pretty well. However, if any other application (including Finder) needs to access anything inside a bundle, you're SOL. In my case, MS Word's data merge manager needed to know where one of the database files was. Not possible.
Create an account or sign in to comment