Portal:AOL-Files/Articles/How to write TOD files

From NINA Wiki
Jump to navigation Jump to search
AOL-Files Aolfileswhite.png  
AOL-Files Articles Downloads FDO91

(Originally by AOL-Files staff member Lummox)

TOD (an acronym for Tools On Demand) is an interesting update feature of AOL which we can easily exploit to create our own updates and tools for AOL. TOD files normally come packaged in .UTF files, which I discovered some time ago, are nothing more than .ZIP files. (UTF's are those annoying updates that AOL occasionally downloads when you sign off).

The .UTF files always contain a file with the extension .TOD, some binaries to be inserted into the AOL database (main.idx) and occasionally some other files which are used to update the client, such as new DLLs, etc. All of these files are unzipped into the TOD sub directory off of your root AOL directory.

The TOD scripting language can move around files and perform other basic file manipulation functions, but most importantly, it can insert and extract records from main.idx. Let's take an example of a TOD file: (comments are indicated by semicolons)

;Begin test.tod

dbget tod\pbackup.bin 32-278 ;Extract the preferences form from the database for backup 
dbget tod\signon.bin 32-221 ;Extract the sign on screen
dbput tod\signon.bin 32-278 ;Replace the preferences with the sign on screen

delete tod\signon.bin
delete tod\test.tod

; End

The TOD file is divided into three parts, the INFO section, the INSTALL section, and the CLEANUP section, although for our purposes, we are only concerned with the install section. The command dbget is used to extract a binary image of a record in the database by it's ID. The syntax is dbget [FILENAME] [RECORD NUMBER]. 32-278 is the record number for the preferences form, which you can normally access by going to My AOL - Preferences. The first thing this sample TOD script does is make a backup of the preferences form. Then it extracts the sign on screen as well.

Then it uses the dbput command, which works just like dbget, to insert the sign on screen into the record where the preferences form exists. (It actually overwrites the old record). Finally, we get to the cleanup section where we delete any binaries we want to get rid of and then the TOD file itself. That last step is important otherwise the TOD file will be executed every time AOL starts. If you would like to test the above TOD file, copy and paste it into notepad and save it as test.tod in your AOL\TOD directory.

Restart AOL and the script will execute. The above TOD will replace your preferences window with a sign on screen, so that every time you select preferences, a sign on screen will pop up. This can be annoying, so here's a script to undo the changes:

;Begin undo.tod


dbput tod\pbackup.bin 32-278 ;Place the backed up preferences into its proper location

delete tod\pbackup.bin
delete tod\undo.tod

; End

The potential uses for TOD scripts are huge. For example, you can write your own useful tools in FDO and then extract them in their binary compiled form using a utility like dbview. Then you can write a TOD script to distribute your tools. Through a bit of experimenting, you can modify certain records that are always called when you sign on or start the AOL software to make them load your own FDO scripts.

Lastly, there are other commands in the TOD scripting language which can be useful, such as copy, which works exactly like the DOS copy command and can be used to move files around the hard drive. Well, that's everything, have fun writing TOD scripts.