
236
Chapter 14 Scripting the Visual Tools Object Model
}
finally{
ActiveDocument.EndUpdate();
}
MessageBox(’Total tags: ’ + iTags, ’Tag Count’, 0);
}
}
GetCaretPos
Syntax
GetCaretPos(var x, y: integer);
Description
Returns the caret pos (x=column, y=line).
GetCurrentChar
Syntax
GetCurrentChar(): OleVariant;
Description
Returns the current character.
GetNextChar
Syntax
GetNextChar(): OleVariant;
Description
Returns the next character. If you use this function, along with
GetPreviousChar,
in
long loops, the code can run slowly.
GetPreviousChar
Syntax
GetPreviousChar(): OleVariant;
Description
Returns the previous character.
GetTagAtCursor
Syntax
GetTagAtCursor(wbSelect: WordBool): WideString;
Description
Boolean. Returns the tag in which the cursor is currently located in the editor. If a tag
cannot be identified, the method returns an empty string.
If
wbSelect
is
True
, the tag is highlighted in the document.
Example
// Displays a message box with the current tag
function Main() {
with (Application) {
MessageBox(ActiveDocument.GetTagAtCursor(false), ’Current Tag At
Cursor’, 0);
}
}
Содержание ColdFusion Server 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...