Auto Load - Loads files automatically

by Andrew Benson


Auto Load is a handy application which sits on the icon bar and watches for double clicks on files in Filer windows. When a file is double-clicked, if there is an application installed which recognises the filetype as its own, it will load the file as usual. Similarly, if the application which 'owns' the filetype is known to the Filer, it will be installed first and then the file loaded. Otherwise, Auto Load will check its own database and will attempt to install an application which can handle the file.

To do this Auto Load must be told initially where to find the application which deals with each filetype. This can take a little while to set up, but once done you can simply double-click on any file in future and it will be run regardless of whether the Filer has 'seen' the parent application or not.

The advantage of using Auto Load is that it avoids the need to take up a considerable amount of time at start-up running a whole string of Filer_Boot commands for applications which you may well not need to use during that session.

Although Auto Load will work perfectly well from floppy disc it is much more useful when placed on a hard disc as it requires access to the disc to check its database of filetypes. Users without a hard disc might find it more useful to place Auto Load in the RAM disc (it only takes up about 60k). Hard disc users should include Auto Load in their boot file so that it will be installed automatically.

If not installed during your boot sequence, Auto Load is run by double-clicking on its icon in a directory display or clicking on its icon in the RISC User Menu program filer window, after which its icon will appear on the right-hand side of the icon bar. Clicking Menu over this icon will display a standard menu containing two options: Info and Quit. These have the usual functions.

Clicking Select over the icon will display a small window which allows you to set up the database of filetypes. The window contains two writable icons. The first shows the filetype in hexadecimal for which information is being displayed. You can either enter a known filetype number here, or you can drag any file to the window, whereupon the number of that file's type will be displayed.

The Retrieve button will cause Auto Load to search its database and, if found, display the application that it will run when files of that filetype are double-clicked. For example, try entering AFF (the Draw file type) into the filetype icon and then click on Retrieve. The second writable icon will now display the path of the Draw application on RISC OS 3 machines. This means that if a file of type AFF is double-clicked and the Filer hasn't seen the Draw application, Auto Load will first load up Draw and then will load the Draw file into it.

To add your own filetypes to the list, either drag a file to the window or enter its hex filetype number into the icon if you already know it. It may be that the filetype is already known to the Filer (i.e. the parent application has already been seen), in which case there will be a run type system variable in existence. Clicking on Auto Load's Search icon will search through all the run type variables to see if there is one for this type, and if it contains a valid pathname for the parent application. If so, that pathname is automatically entered into the second writable icon.

If a run type variable is not found, then you must set the pathname yourself. Either drag the parent application into Auto Load's window, which will set the pathname, or type the pathname yourself into the second writable icon. Once all the information is in the window, clicking on the Add icon will update the database and add that filetype to the list of known types.

Any entry in the database can be removed by entering the filetype and then clicking on Delete.

Once this has been done, then whenever it is running, Auto Load will load up the relevant application whenever files belonging to it are clicked upon.


 Copyright RISC User 1994
