' ------------------------------------------------------------------------------------ ' AutoTOC ' This script builds a HTML table of content for the current album and place ' it at the beginning of the album. ' ------------------------------------------------------------------------------------ Option Explicit app.ClearTrace Dim alb, pic set alb = app.GetCurrentAlbum Dim outputFileName outputFileName = Replace( alb.FullName, ".alb", ".html" ) app.Trace "Output file = " & outputFileName Const ForReading = 1, ForWriting = 2 Dim fso, f, m Set fso = CreateObject("Scripting.FileSystemObject") Set f = fso.OpenTextFile( outputFileName, ForWriting, True) f.WriteLine "" f.WriteLine "
" f.WriteLine " " f.WriteLine " " f.WriteLine "" f.WriteLine " | " & alb.ExpandMacro( pic, "%BF" ) & " | " f.WriteLine "" & pic.sCommentFirstLine & " | " f.WriteLine "