![MACROMEDIA COLDFUSION 4.5 Use Manual Download Page 234](http://html1.mh-extra.com/html/macromedia/coldfusion-4-5/coldfusion-4-5_use-manual_687485234.webp)
242
VBScript
<html>
<head>
<title>VBScript Example</title>
</head>
<body>
<pre>
//=============================================================
// Displays a table containing file information
//============================================================
Sub Main
dim app
dim idx
dim sTable
dim newline, fname, br, tab
dim nCurrentIdx
newline = chr(13) + chr(10)
br = "<br>"
tab = chr(9)
‘ create app reference. note that the Application object is only
‘ available from within HomeSite and Studio - to create the app object
from an
‘ external script, use
CreateObject("AllaireClientApp.TAllaireClientApp")
set app = Application
‘ save the index of the current document so it can be returned to
nCurrentIdx = app.DocumentIndex
‘ start the table
sTable = "<b><font color=Blue>Names of all open"_
+ " documents:</font></b>"_
+ br + n br + newline _
+ "<table border=1 width=460>"_
+ n "<tr>"_
+ "<td><b>Document</b></td>"_
+ "<td><b>Modified</b></td>"_
+ "<td><b>Read-Only</b></td>"_
+ "</tr>" + newline
‘ loop through all open documents (note that DocumentCount is
1-based,
‘ whereas DocumentCache() is 0-based)
for idx = 0 to app.DocumentCount - 1
‘ get document name (uses function example)
fname = GetDisplayName(app.DocumentCache(idx).Filename)
sTable = tab + "<tr><td>" + fname
sTable = "</td><td>"
Summary of Contents for COLDFUSION 4.5
Page 1: ...Allaire Corporation Using ColdFusion Studio ColdFusion Studio 4 5 for Windows 95 98 NT4 2000...
Page 16: ...xvi Contacting Allaire...
Page 90: ...82...
Page 130: ...122...
Page 133: ...141 Two VTML tags CAT and E let you customize the content of these dialog boxes...
Page 182: ...190...