Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Bundling a database within an Applescript

Featured Replies

(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

  • 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

Important Information

By using this site, you agree to our Terms of Use.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.