Safari Page Monitor

[Last updated 2003-02-04]
This AppleScript keeps an eye on one or more web pages through Safari, reloading them at specified intervals and reporting any changes it detects, both verbally and through a session log file.

I wrote this script to keep tabs on my brother's home page after they had had their first baby and started posting pictures. I remembered a page-monitoring feature in the Classic version of Internet Explorer and decided Safari needed something comparable. I am releasing it to the public domain now because I think I have taken it about as far as it can go as a regular script application. To improve it further, I would need to bring it into AppleScript Studio and tack on a user interface.




There are two ways to use Safari Page Monitor.

The old way:

  1. Open each page you want to monitor in its own window in Safari.
  2. Run Safari Page Monitor to track those pages for changes.

The new way:

  1. Make a web location file for each page you want to monitor.
  2. Drag a selection of these files onto the Safari Page Monitor application.
A web location file is what you get when you click on the favicon (the small icon to the left of the web address line at the top of any Safari window) and drag it onto the desktop. Whenever you drag these files onto Safari Page Monitor, it forgets whatever it was tracking before and starts monitoring the new ones instead.

Setting preferences

In its present state, Safari Page Monitor is a basic AppleScript with little in the way of a user interface. Eventually, I will probably migrate it to a full-fledged AppleScript Studio application with some sort of configuration dialog for setting preferences. In the meantime, however, I have come up with a primitive scheme for adjusting certain settings.

You can enter application preferences in the Finder comments of the Safari Page Monitor application. (Click on the application file and select Get Info from the File menu. The Comments field is at the bottom of the Info window.) You can also enter page-specific preferences in the Finder comments of your web location files. The following preference parameters have been defined thus far:
Parameter Location Default Value Description
quiet application file none Suppress the voice reports generated by Safari Page Monitor.
passive application file none Normally, SPM re-opens any pages it is tracking should you happen to close them. In passive mode, it keeps a lower profile, reporting that the page could not be found but taking no further action until you open it up again manually.
verbose application file none Provide a more detailed log of what SPM is doing. (Fear not, however; verbose does not make it actually talk any more!)
noconsole application file none Suppress bringing up the Console utility to show Safari Page Monitor's log file.
reload web location file 10 The number of minutes between page reloads.
sensitivity web location file 1 The number of lines of web page text which must change before the change will be reported. The default 1 therefore means any change will be reported.
Each preference parameter is a single word, and you should separate multiple parameters with spaces. For those which require a value, the value should be in the word following the parameter name. So "reload 10 sensitivity 2" (without the quotes) would have the page reload every 10 minutes and report changes when two or more lines change.

Frequently Asked Questions

Version History

Known Issues


Safari Page Monitor is freeware. It may be used and distributed in its unmodified form, but not sold. You may make modifications to the script for your own personal use, but I ask that you submit to me any changes you would like to see in the public distribution, as it is important to me to retain version control.