Vbscript - MACROMEDIA HOMESITE Using Manual

For windows 98, windows me, windows nt 4.0, windows 2000, and windows xp
Table of Contents

Advertisement

306

VBScript

<html>
<head>
</head>
<body>
<pre>
//********************************************************//
// Displays a table containing file information
//********************************************************//
Sub Main
<title>VBScript Example</title>
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.
' 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 + newline + br + newline _
+ "<table border=1 width=460>"_
+ newline + "<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 = sTable + tab + "<tr><td>" + fname
sTable = sTable + "</td><td>"
Chapter 15 Scripting the Visual Tools Object Model
note that the Application object is only

Advertisement

Table of Contents
loading

This manual is also suitable for:

Homesite+ for dreamweaver mx

Table of Contents