frondoc picture

What is Frontier?
News & Updates

Web Tutorial
Scripting Tutorial
BBEdit Scripting

Mailing Lists
Sample Scripts
Verb Set
Frontier Site Outline


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

frondoc picture

Your First Script

If you follow the instructions on this page you'll get a great new skill -- you'll be able to add your own commands to the Finder's menu bar.

After downloading Frontier, open the Misc Stuff folder, then open Copy to System Folder, and drag the OSA Menu extension into the Extensions sub-folder of your System Folder. Restart. Launch Frontier. Bring the Finder to the front. You should see a Scripts menu in the Finder's menu bar.

script1.0 Picture
Figure 0: The Finder's menu bar with OSA Menu installed and Frontier 4.0 running.

Choose Menu Editor from the Scripts menu. Frontier comes to the front with its menu bar editing window open and the contents of the Scripts menu displayed.

script1.1 Picture
Figure 1: system.menubars.MACS with the cursor on the Scripts menu. It's collapsed.

Click on the wedge next to Scripts to place the cursor on that line. Collapse the menu if necessary by double-clicking on the wedge. Press return to create a new menu. Type your name and then press Return. Move the new headline under the menu title by pressing the Tab key. Type Hello! and then press Enter. The outline window should look like this:

script1.2 Picture
Figure 2: Picture of system.menubars.MACS with the Hello! command indented under the Dave menu.

Click on the Script button in the upper right corner of the window. A new window opens, showing you an empty script. Type the following text:

dialog.alert ("Hello!")

Press Enter. Press Cmd-S to save changes. Option-click in the close box on any window to close all the windows you opened. Bring the Finder to the front. You should see a new menu with your name as its title. Pull it down. You should see one command, Hello! Choose it. A dialog should appear:

script1.3 Picture
Figure 3: Picture of a Finder alert dialog, displaying Hello!

Congratulations. You just wrote a script!

Brent says...

After reading this page, Brent Simmons, co-sysop of the Frontier-beginner's list, sent me an email:


On the question of what might be helpful to new people, I must admit that what had me stumped at first was whether Frontier had to be actually running to work its magic.

I was used to the AppleScript extension and the Script Editor, and conceived of Frontier as the UserTalk Script Editor. When I couldn't find the UserTalk scripting extension I was terribly confused.

It wouldn't hurt to state some of these things explicitly, things like "Frontier is an application, not a system extension. In order to work it must be running." Also: "If you double-click on a deskscript it will launch Frontier if it's not already running."

You can perhaps see how someone with an AppleScript background would be easily confused by an application instead of an extension.


Thanks! Brent is one of the most accomplished Frontier webmasters, but everyone started out not knowing Frontier and so did he. So if you're confused -- don't worry -- you have good company! Ask questions on the Frontier-beginners list and we'll keep updating this page with more glitch-fixers. Keep digging!


© Copyright 1996-97 UserLand Software. This page was last built on 5/14/97; 8:03:13 AM. It was originally posted on 5/14/96; 6:10:13 PM. Internet service provided by Conxion.