
232
Chapter 14 Scripting the Visual Tools Object Model
LineCount
Syntax
LineCount: integer (read-only
Description
Number of lines in the active document.
Example
function Main() {
var sMessage;
sMessage = "Your file line count is: ";
with (Application) {
sMessage = sM ActiveDocument.LineCount;
MessageBox(sMessage, VersionText, 0);
}
}
Lines
Syntax
Lines(Index: integer) OleString
Description
Gets and sets the text of the line at the passed index. Iterating through a document
using the Lines property might be slow, especially for large documents. For best
results, only use Lines to evaluate single lines of text. If you must use Lines to update
many lines, you can increase performance by wrapping the update in a
BeginUpdate..EndUpdate
block.
Example
function Main(){
with (Application){
ActiveDocument.Lines(0) = ’<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML
4.01 Transitional//EN">’;
}
}
Modified
Syntax
Modified: WordBool (read-only)
Description
Boolean. Returns
True
if the document changed since it was last saved.
Example
function Main() {
var sMessage;
sMessage = "Modified : ";
with (Application) {
If(ActiveDocument.Modified)
sMessage = sM "Yes";
Else
sMessage = sM "No";
Содержание COLDFUSION STUDIO 5-USING COLDFUSION 5...
Страница 18: ...xviii About This Book...
Страница 26: ...8 Chapter 1 Setting Up the Product...
Страница 42: ...24 Chapter 2 Configuring Browsers and Servers...
Страница 60: ...42 Chapter 3 Exploring the Workspace...
Страница 100: ...82 Chapter 6 Editing Pages...
Страница 126: ...108 Chapter 7 Using Web Development Languages...
Страница 212: ...194 Chapter 13 Customizing the Development Environment...
Страница 320: ...302 Glossary...