MACROMEDIA COLDFUSION STUDIO 4.5-USING COLDFUSION STUDIO Use Manual page 233

For windows 95/98/nt4/2000
Table of Contents

Advertisement

// is this document modified?
if (app.DocumentCache(idx).Modified)
sTable = sTable + 'Yes';
sTable = sTable + '</td><td>';
// is this document read-only?
if (app.DocumentCache(idx).ReadOnly)
sTable = sTable + 'Yes';
// close row
sTable = sTable + '</td></tr>' + newline;
}
sTable = sTable + newline + '</table>';
// add a new document (False = don't create from default template -
blank)
app.NewDocument(false);
// insert the table (note that the ActiveDocument will be the new
document
// created above)
app.ActiveDocument.InsertText(sTable, false);
// switch to browse mode
app.CurrentView = 2;
// wait for user to re-enter edit mode
while (app.CurrentView != 1) {
// Wait is a home-grown routine to make up for the loss of
// DoEvents in VBScript. it will pause for a given number of
// milliseconds without locking the interface
app.Wait(100);
}
// return to the original document
app.DocumentIndex = nCurrentIdx;
alert('Script Completed.');
// function call example
function GetDisplayName(fname) {
if (fname == '')
return '(untitled)'
else
return fname
}
</pre>
</body>
</html>
241

Advertisement

Table of Contents
loading

This manual is also suitable for:

Coldfusion studio 4.5

Table of Contents