224
Chapter 14 Scripting the Visual Tools Object Model
Wait
Syntax
Wait(nMilliseconds: Integer);
Description
Pauses for given number of milliseconds. Use Wait to enable scripts to execute loops
yet still allow access to the UI. Without the call to Wait in the loop, the application
appears locked and the user cannot change views.
Example
The following JScript sample waits for the user to return to edit source view:
var app = Application;
while (app.CurrentView != 1) {
app.Wait(100);
}
This is the same sample code in VBScript:
set app = Application
while app.CurrentView 1
app.Wait (100)
wend
Toolbar and toolbutton methods
This section contains the toolbar manipulation methods available in the Application
object, grouped together for easy reference.
A unique name identifies each toolbar. The name of the toolbar displays in the title
bar caption when the toolbar is not docked. Toolbars are loaded from files in the
toolbar directory, which can be obtained from the
ToolbarDir
property. The toolbar
name is the same as its file name without the path or extension. For example, if the
toolbar file name is Custom.tbr, then the toolbar name is Custom.
When you create a toolbutton, remember that a toolbutton label is limited to two
characters.
AddAppToolbutton
Syntax
AddAppToolbutton(wsToolbarName, wsExeFile, wsCmdLine, wsHint: Wide-
String): WordBool;
Description
Boolean. Adds a toolbutton for an external application to the passed toolbar. Fails if
the toolbar does not exist or if the toolbutton could not be added. Returns
True
if the
same toolbutton (based on
wsExeFile
and
wsCmdLine
) already exists on the toolbar,
but does not add a duplicate button.
Example
function Main(){
with (Application){
AddAppToolbutton(’Standard’, ’Notepad.exe’, ’’, ’NotePad’);
}
}
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...