John Sullivan's Software Page

This page lists various projects I have worked on in my spare time:

Suggestions, bug reports, by email to johns *a*t*

Application Scripting Framework

Platform: Win32 / WTL / COM / Active Scripting
Status: Work In Progress

This is a reusable library which will allow Windows applications to provide end-users with powerful built-in scripting capabilities. It consists of a simple external API to allow flexible and minimum-impact integration with the host code. Internally it contains a document/project manager to maintain correspondance between host application projects and their associated scripts, an interface to an Active Scripting Engine to execute the scripts and an IDE including an integrated code editor to allow writing, running and debugging the scripts.

The Active Scripting interfaces are used to provide access to arbitrary execution engines. This simplifies the code by not having to implement a language engine, and insulating it from the details of any specific language, whilst allowing the end-user to choose the language they are most comfortable scripting in, making the system more accessible. JavaScript and VBScript are provided with Windows, and Active Scripting Engines for many other languages are widely available.

Music/DJ Setlist Database

Platform: Apache / PHP / PostgreSQL / XHTML1.1 / CSS
Design Documentation: (coming soon)

This project seeks to document all the recorded DJ setlists for a local nightclub, to provide additional statistics based on the tracks played, additional information on each band or track played, and the DJs who played them.

CDInfo applet

Platform: Win32 / VC++ / WTL / MCI / Win9x / WinNT

Written as a helper application for the music database, this tool allows for efficient entry of audio CD track timings taken from the CD Table Of Contents (TOC). The source demonstrates the following methods:


Platform: Win32 / VC++ / WTL / DirectDraw / DirectSound

A simple oscilloscope and spectrum analyzer applet for Windows. Takes input from the default DirectSound capture device.

Flame Screensaver

Platform: Win32 / VC++ / WTL

Flame was always my favourite screensaver under X Windows. This is a port to Microsoft Windows which sports a simple settings dialog (original was controlled by command-line arguments, by editing Xresources directly or using a standalone config panel), control-panel preview and demo modes and multiple monitor support.

The screensaver shell is new, but the original screen hack code was lifted from Jamie Zawinski's xscreensaver package, with minor modifications to parameterise it for multi-monitor displays under Win32. The original code contained this copyright/license notice.

UK International Keyboard Layout

Platform: Windows 95 / 98 / 98SE / ME / NT4.0 / 2000 / Server 2003 / XP

This layout allows easy and mnemonic access to many accented and special characters using a standard UK QWERTY keyboard.

The version for NT OSs was constructed using Microsoft's free Keyboard Layout Creator tool, the version for 9x OSs was built by hand with very little useful documentation on the file format used.

Terra MODIS Earth Map Display

Platform: Win32 / VC++ / WTL / DirectDraw

In 2002 satellite imagery from Terra MODIS was made publicly available under GPL (full data credits within The full data sets including 24-bit photographic, topographic, bathymetric, land-use classification, water cover and cloud cover maps of the entire planet at 30 arcsecond (1km at the equator) resolution. This cut down viewer uses a prescaled version of the photographic (original filesize was 2.6Gb!) and landcover classification data and remaps the cylindrical projection to display a spinning (but mouse draggable) globe. Requires a 24/32-bit display mode and a fairly fast machine!

The motivation behind this project was to see how hard it would be to visualise large (multi-Gigabyte) datasets in real time. The answer is that on today's commodity PC hardware it is very hard indeed. The display functions tolerably well on the scaled-down dataset included here, but the sheer size of the data makes loading it all into memory unworkable and extracting an arbitrary subset of the data directly from the original file is killed by the number of head seeks. Extracting a 1000x1000 pixel subset out of the original 43200x21600 data requires 1000 seeks, which can easily take several seconds even if the total amount of data could be transferred in milliseconds if it were contiguous. It may be possible to drastically reduce the number of seeks using approaches such as precomputing scaled down copies of the data (divided by 2, 4, 8 etc.) and reordering the data into tiled sections (such that loading, say, 10 scanlines at a time requires a single head seek) or along a Hilbert or other space-filling curve. The tradeoff here is that the fewer head seeks, the more unwanted data has to be loaded alongside the wanted subsection, and this may still not reach the original goal of allowing pan and zoom over the whole dataset at full framerate. (Assuming full framerate is 25 fps, this gives 40ms to load and process all required data. Even with optimistic pre-loading this is a difficult limit.)

Clipboard Utilities

Platform: Win32

CopyPath provides "Copy Path to Clipboard" context menus within Explorer. To install place the executable somewhere in the PATH (for example, in the Windows System/System32 directory) and run the associated .reg file.

GotoClip allows you to launch a given application with the current clipboard contents on the command-line, for example for launching a web-browser to view a copied URL. To use, create a shortcut on the Desktop, Start Menu or Quick Launch Bar, and edit the shortcut path to include the program you want to launch. For example, to launch Internet Explorer on a URL copied to the clipboard, change the shortcut path from "...\GotoClip.exe" to "...\GotoClip.exe" iexplore.exe. (Tip: You can also launch URLs by pasting them directly into the Start->Run dialog, which can also be quickly accessed by hitting Windows-R. But this will probably replace an existing browser window with the target at random unless you hack the registry to disable DDE for (at least) the shell http open verb.)

UNCResolve converts Windows paths into either UNC format or file: URLs, useful for emailing file links around an intranet when not everyone may have the same drive mappings configured. (Paths using a drive letter may not be portable between different users. Paths using UNC \\SERVER\SHARE format or URL file://SERVER/share format are portable. UNC format will be directly clickable within some mailers or can be pasted into Windows Explorer's location bar. URLs are more widely supported within email clients or can be pasted into your web browser's location bar. To use, run and use the System Tray icon to convert paths as required.


Platform: Win32 / Winsock2

SMteePD acts as a proxy for outgoing network connections as an aid to protocol debugging. By setting it up to listen on local port 25, or 80 for HTTP, and reconfiguring the local client to connect to it rather than the remote server, a complete dump of the two-way conversation between the two can be produced. Also demonstrates correct use of WSAEventSelect without stalling or data-loss.


Platform: Win32 Source:

A friend complained that their favourite key bindings for game playing were close enough to Alt-Tab that they were repeatedly accidentally dropping out of the game. This very simple applet prevents this by temporarily overriding the Alt-Tab sequence to prevent it from switching tasks.

License Information for Flame

The screen hack code comes from the xscreensaver package by Jamie Zawinski. The code used (in file ./hacks/flame.c within the xscreensaver source tree, and ./hack.cpp within the Win32 Flame source tree) bears the following notice:

 /* xscreensaver, Copyright (c) 1993, 1995, 1996, 1998
 *  Jamie Zawinski 
 * Permission to use, copy, modify, distribute, and sell this software and its
 * documentation for any purpose is hereby granted without fee, provided that
 * the above copyright notice appear in all copies and that both that
 * copyright notice and this permission notice appear in supporting
 * documentation.  No representations are made about the suitability of this
 * software for any purpose.  It is provided "as is" without express or 
 * implied warranty.

/* This file was ported from xlock for use in xscreensaver (and standalone)
 * by jwz on 18-Oct-93.  (And again, 11-May-97.)  Original copyright reads:
 *   static char sccsid[] = "@(#)flame.c 1.4 91/09/27 XLOCK";
 * flame.c - recursive fractal cosmic flames.
 * Copyright (c) 1991 by Patrick J. Naughton.
 * Permission to use, copy, modify, and distribute this software and its
 * documentation for any purpose and without fee is hereby granted,
 * provided that the above copyright notice appear in all copies and that
 * both that copyright notice and this permission notice appear in
 * supporting documentation.
 * This file is provided AS IS with no warranties of any kind.  The author
 * shall have no liability with respect to the infringement of copyrights,
 * trade secrets or any patents by this file or any part thereof.  In no
 * event will the author be liable for any lost revenue or profits or
 * other special, indirect and consequential damages.
 * Comments and additions should be sent to the author:
 *             Patrick J. Naughton
 *             MS 21-14
 *             Sun Laboritories, Inc.
 *             2550 Garcia Ave
 *             Mountain View, CA  94043
 * Revision History:
 * 01-Jun-95: This should look more like the original with some updates by
 *            Scott Draves.
 * 27-Jun-91: vary number of functions used.
 * 24-Jun-91: fixed portability problem with integer mod (%).
 * 06-Jun-91: Written. (received from Scott Draves,

No additional restrictions are placed on my Win32 port.