234
Chapter 14 Scripting the Visual Tools Object Model
SelText
Syntax
SelText: OleString
Description
Gets and sets the text in the current selection.
Example
function Main() {
var sMessage;
sMessage = "The length of the selected text of your document is ";
with (Application) {
sMessage = sM ActiveDocument.SelText;
MessageBox(sMessage, VersionText, 0);
}
}
TabIndex
Syntax
TabIndex
Description
Gets and sets the tab index of the document tab.
Example
function Main(){
with (Application){
if (ActiveDocument.TabIndex != 0){
DocumentIndex = 0;
}
}
}
Text
Syntax
Text: OleString
Description
Gets and sets the complete document text.
Methods
BeginUpdate
Syntax
BeginUpdate();
Description
Turns off screen updating for the active document. This is useful if your script needs
to make several changes to the active document at once—turning off screen
updating during the procedure might significantly speed up the process. To turn on
updating again, use
EndUpdate
.
Use
BeginUpdate...EndUpdate
with caution. If you fail to call
EndUpdate
after a call
to
BeginUpdate
, or if the script crashes before
EndUpdate
is called, the user cannot
view any changes made in the editor.
Summary of Contents for ColdFusion Server 5
Page 18: ...xviii About This Book...
Page 26: ...8 Chapter 1 Setting Up the Product...
Page 42: ...24 Chapter 2 Configuring Browsers and Servers...
Page 60: ...42 Chapter 3 Exploring the Workspace...
Page 100: ...82 Chapter 6 Editing Pages...
Page 126: ...108 Chapter 7 Using Web Development Languages...
Page 212: ...194 Chapter 13 Customizing the Development Environment...
Page 320: ...302 Glossary...