Search this book | Previous | Table of contents | Next

Duke of URL

The Duke of URL, like Cyber Link, extracts URLs from the current window of Netscape and creates a new file that, when opened, will open Netscape and return you to that URL.

The Duke's wizardry is accomplished through short and simple AppleScripts. These scripts basically extract the URL from the topmost window of Netscape 1.1N as well as the URL's title. They then duplicate a template file from your Preferences folder (distributed with the Duke of URL) and save the extracted URL to the duplicated file. Last, the Duke of URL renames the duplicated file with the title of the URL. Preformed many times, the result is a set of AppleScript applications that, when activated, will optionally launch Netscape and open the stored URLs.

The Duke works, but not without a couple of caveats. First, the name "Netscape 1.1N" is hard coded into the AppleScripts. Consequently, if you have not saved your Netscape application as "Netscape 1.1N", then the Duke will always ask you for the location of your browser. This can be avoided by either renaming Netscape or editing the Duke of URL AppleScript as well as its template file. Second, the Duke of URL saves its extracted URLs as AppleScript "properties". As you may or may not know, AppleScript properties are special variables that retain their values once they have been initialized. Unfortunately, AppleScript properties loose their values when you edit the scripts wherein they are contained. Consequently, if you try to edit any of the files created by the Duke of URL, then those scripts will "forget" the URLs they originally preserved.

The Duke of URL is not a bad set of AppleScripts. If you use it exactly the way it was intended, then it will preform admirably. More importantly, these scripts, because they are editable, are more useful for the knowledge they can demonstrate in scripting Netscape through AppleScripts.

Search this book | Previous | Table of contents | Next

This page was first published on September 26, 1995. Feel free to send comments.