frondoc picture
What is Frontier?
Download
News & Updates
Mailing Lists
Sample Scripts
Site Outline
Search
Guestbook
BBS
User's Guide
1 2 3 4 5 6
7 8 9 10 11
Apple File Edit
Main Open Suites
Web Window
Menubar Outline
Script Table WP

Frontier website on www.scripting.com

The Main Menu

The Main menu is the first of several customizable menus in the Frontier environment. It includes a number of menu options you'll find essential as you write scripts in Frontier.

mainMenu Picture

Frontier's Main Menu

About this Menu

This command displays a dialog that explains the purpose of the Main menu, and links to this web page.

aboutMainMenu Picture

New Script

The New Script command opens a dialog (new in Frontier 4.1) that makes it easy to create a new script, in either UserTalk or AppleScript.

newScriptDialog Picture

Given the settings as shown above, when you click on the OK button, a new UserTalk script will be created in the system.agents table.

Here's the Kind popup menu:

newScriptKindPopup Picture

And here's the Language popup menu:

newScriptLangPopup Picture

When you want to create a new script press cmd-N. Choose a Kind, choose a language, click on OK. Edit the script. Debug. Run. Use.

Export

The Export command opens a dialog (new in Frontier 4.1) that allows you to export any object from Frontier's object database to the Macintosh file system, or as an attachment to a Eudora email message.

guiExportDialog Picture

Open a window, or place the table cursor on the item you want to export. If you want to export a different item, enter its address in the dialog.

guiExportKindPopup Picture

guiExportLocationPopup Picture

You can choose no compression, to compress the resulting file using StuffIt 3.5 or greater; or to compress it and then BinHex the resulting file.

Objects that are exported this way can be imported into Frontier by double-clicking on the file in the Finder. The objects contain information that route them to the correct object database location. Frontier will not overwrite any data without confirmation.

Run Selection

Run Selection, or Command-/, has slightly different behavior depending on the type of the frontmost Frontier window. In a word processing text document, it runs the exact selection, putting the result as a message in the main window. In outline windows, this command runs the entire line (independent of the exact selection) and places the generated value as the first subhead of the line. In menubar windows, the script linked to the item is run. In table windows, the selected string or script is run if possible.

Edit with App

Edit with App, or Command-E, is a new command in Frontier 4.1. It allows you to edit AppleScripts, text windows and strings, and MacBird cards, using external editors.

When you save your changes in any of these editors, the result is saved into the object database, not the file system. If you're wondering how we did this, it's not a hack, we worked with the developers of each of these products to make them work well with Frontier.

Find & Replace

Find & Replace is a hierarchical menu. All of this item's sub-menus have Command-key equivalents and you'll probably find yourself using the find-replace capability in Frontier much more often with those keyboard shortcuts than with the menu options.

Command-F invokes the Find & Replace Dialog option, which in turn displays a dialog like the one shown below.

Frontier's Find & Replace Dialog

Command-G repeats the last find operation from the current cursor position, looking for the next occurrence of the string for which you are searching. Command-H carries out the replacement operation called for in the Find & Replace dialog and then repeats the last find operation from the current cursor position.

How much of the Object Database is searched? That depends on what window is frontmost when you invoke the operation. The following table summarizes the scope of the Find & Replace operation.

Find & Replace Invoked In...Has Scope Of...
Main WindowEntire Object Database
Table WindowThat table and all of its sub-tables, and so on until last sub-table is searched
Menubar WindowThat window plus all of its scripts
Outline, Script or Word Processing WindowThat window

Common Styles

The Common Styles hierarchical menu allows you to change the font and size of an outline, script, table, or word processing selection to one of the most common style combinations, Geneva 9-point, Geneva 12, Palatino 12 or Helvetica 18. All of these commands have Command-keystrokes.

We encourage you to change these entries to suit your own style and preferences for font and size combinations. To do so, hold down the Option key while selecting the command to open one of these scripts. They all look the same except for their specific font and size contents. Here's the one for 9-point Geneva, for example:

enviro4165 Picture

By editing either or both of these lines of script to call for a different type and/or size, you can customize this menu easily. Don't forget to rename the menu item so you'll remember what it does. You could also add your own styles to this menu by copying a script from one of the existing entries and then editing it after attaching it to a newly created entry in the menu.

AppleScripts

The AppleScripts hierarchical menu, new in Frontier 4.1, adds important commands for AppleScript writing and development in the Frontier environment. For more information see the Working with AppleScript page.

Misc

The Misc sub-menu contains miscellaneous commands, and it's also a place where we can add new commands in the future. The first command restarts the Macintosh OS Finder. Programmers sometimes need to do this. It happens. (This is a family-oriented manual.)

Insert Date/Time is a useful command when you want to add the current date and time to the text you're editing. It has a single-keystroke, Cmd-4. I'll press it right now. Fri, Sep 27, 1996 at 4:08:42 AM by DW. It works! You can do it too.

The last two items in this menu are for the tutorial, they are used in the Tutorial website to illustrate how to write scripts that run from the menubar.

Disable Agents

This command displays a dialog asking if you want to turn off Agent scripts.

An agent script is an AppleScript or UserTalk script that runs as a background process, repeating its operations at specified intervals (see the Agents page).

Important: If agents are turned off, Frontier's automatic changing of menus based on which window is frontmost (discussed in Chapter 7 of the tutorial) will not work. That behavior depends on an agent script.

You may want to disable agents when one or more of them is misbehaving in some way and you want to track the problem down. Running without agents turned on is like starting up the Macintosh OS with extensions disabled (except you don't have to restart Frontier to do it).

When agents are disabled, this command changes to Enable agents, and it leads to a dialog that allows you to turn them on again.

All agent scripts are either running or not as a group. You cannot turn one agent off and leave others on -- although you can cut an agent script from the agents table and paste it somewhere else for later retrieval.

You can open the agents table by Jumping to system.agents, or using the Main Navigator thru The Open Menu.

Backup

After confirmation, the Backup command creates a copy of Frontier.Root in a sub-folder of the folder that contains the Frontier application. The sub-folder is named "backups."

The backups are serialized (e.g. Frontier.Root.361, Frontier.Root.362), so as you work, you leave a trail behind you.

Backing up is important, and this command makes it simple to do. Just press Command-B to be sure your changes are safe.

Little-known feature: If you have a script at people.[user.initials].customBackup, the Backup command will run that script after it's created the backup. It leaves the path for the backup file in backups.lastfile. Some Frontier users have this script compress the file with StuffIt, and then delete the original, to minimize the space taken by backups.

DocServer

When you choose the DocServer command from the Main menu, a dialog appears asking:

docServerDialog Picture

Frontier launches the DocServer app (it's in the UserLand Utilities folder) and sends it an Apple Event to display the page you entered in the dialog.

More information is on the DocServer page.


© Copyright 1996-97 UserLand Software. This page was last built on Wed, Jan 22, 1997 at 2:44:32 PM with Frontier. Thanks for checking it out! Dave