Automatic Startup Database

If you want Panorama to automatically open one or more databases when you click on the PanoramaX.app icon, open the Preferences->Favorites panel (Panorama X menu) and enter the path or name of the database(s) in the area on the bottom of the window.

As shown above you must enter the full path to the database (the ~ symbol can be used to represent the current users’s home folder). (As an alternative to typing in the name, you can also drag the file icon from the Finder or from a database window title bar.)

#### Opening the Database Secretly (no windows)

If you want to open a database secretly, append `.secret` to the end of the filename. The database will open in memory, but no windows will open (also, the .Initialize procedure won’t run. For example, this could be useful if you wanted to use the database for lookups, but don’t actually need to see or modify the information.

If you actually do need to see or modify the database, use the Memory Usage window to make it visible. Right click on the database name and choose Data Sheet to make the database visible.

#### Opening the Database as a Custom Library

You can also automatically open a database as a custom library, containing one or more custom statements and custom functions. To learn how to create a database containing custom statements and functions, see Custom Statements. To specify that a database should be opened as a custom library, append `.library` to the end of the filename.

When `.library` is appended to the end of the filename, Panorama will:

- Open the database without any wizard.
- Scan the database for any procedures with all uppercase names, and convert those procedures into custom statements.
- Check to see if the database contains an `.InitializeFunctions` procedure, and if so, run it.
- Check to see if the database contains an `.InitializeHotKeys` procedure, and if so, run it.

This process is described in much greater detail on the Custom Statements page.

### Emergency Disabling Automatic Startup Databases

If you don’t want a database to open automatically, simply open the Preferences->Favorites panel and remove that database from the list. But what if there is a problem with an automatically opened database and you can’t open the Preferences window? Fortunately, Panorama provides a method to turn off automatic startup databases without having to open Panorama. The list of automatically opened databases is kept in a file named startupdatabases.txt. That file is kept in the `~/Library/Application Support/PanoramaX` folder.

If there is a problem with this file that is preventing Panorama from launching, you can edit with a text editor (BBEdit, TextMate, VSCode, etc.) or you can simply delete it.

### Advanced Trick: Multiple Copies of Panorama

We normally don’t recommend this, but it’s possible to have more than one copy of PanoramaX.app on your computer, each in a different folder. If you do that, you can put a different copy of startupdatabases.txt in the folder with each copy of PanoramaX.app. So you could have one copy of PanoramaX.app that automatically launches a contacts databases, another one that automatically launches an accounting database, etc.

There are some definite pitfalls to this approach that you should keep in mind. For one thing, when a new version of Panorama is released, you’ll have to upgrade each copy separately. More importantly, if you double click a Panorama database in the Finder, there’s no telling which copy of Panorama will be used to open it.

See Also

- Confirmation Alerts -- Configuring alerts to confirm sensitive operations (deletions, etc.).
- Find & Open -- searching for a database on the hard drive and opening it.
- getapplicationinfo( -- retrieves the value of an item in the application's plist, or a list of all plist items.
- getpreferenceclass( -- retrieves the class name of a preference value.
- getpreferencevalue( -- retrieves the value of a preference.
- info("preferencedomains") -- returns a carriage return delimited list of available preferences domains.
- Open Favorites -- quickly open commonly used databases.
- Open Recent -- quickly re-open recently used databases.
- preferences( -- retreives a list of preferences that have been stored.
- removepreferencevalues -- deletes one or more preference values.
- Scripting Language Configuration -- configuring the scripting languages available to Panorama (Perl, PHP, Python and Ruby).
- setpreferencevalues -- creates and/or modifies a preference value.
- writepreference -- modifies a preference value.

History

Version | Status | Notes
10.2 | New | New in this version.