
218
Chapter 14 Scripting the Visual Tools Object Model
NextDoc
Syntax
NextDoc();
Description
Moves to the next document in the Document tab. If the last document is showing,
wraps to the first.
Example
function Main() {
Var sMessage;
sMessage = "Hello world!";
with (Application) {
NewDocument(false);
NextDoc();
ActiveDocument.InsertText(sMessage); // Moving to the
newly-created document
}
}
PreviousDoc
Syntax
PreviousDoc();
Description
Moves to the previous document in the Document tab. If the first document is
showing, wraps to the last.
Example
function Main(){
with (Application){
// Create a new blank document
NewDocument(false);
// Move back to previous file
PreviousDoc();
}
}
Quit
Syntax
Quit();
Description
This method attempts to exit from or quit the program. It prompts the user to save
any unsaved documents prior to quitting.
Example
function Main(){
var MB_YESNO = 4;
var IDYES = 6;
with (Application){
if (MessageBox(’Exit HomeSite?’, ’Confirmation Message’,
MB_YESNO) == 6){
Quit();
}
Содержание 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...