Invoke Method (ChildWin DialogBox MainWin)

Class

ChildWin, DialogBox, and MainWin.

Action

Invokes the dialog or window, using the menu, menu item, pushbutton, or command line provided in the declaration.

Syntax

window.Invoke()

Notes

  • The Invoke method invokes the current dialog or window, using information specified in the declaration to determine how to invoke the object. For a dialog box, the declaration must contain the wInvoke variable, which defines the menu, menu item, or pushbutton that invokes the dialog box. For a ChildWin, wInvoke can be either a menu or a menu item.

  • When you use the Invoke method for a MainWin, Invoke calls the Start method and passes to it parameters specified in the declaration for the MainWin:
    Parameter
    Description
    sCmdLine
    Variable, a string that defines the command line used to invoke the application. The MainWin declaration must contain a definition for this variable in order to use the Invoke method to invoke the main window.
    sdir
    Optional: Variable, a string that defines the working directory of the application when it is invoked.
    bextensionReady
    Optional: A Boolean that, if set to TRUE, indicates that Silk Test Classic should wait until the application’s extension has finished registering.
    nInvokeTimeout
    Optional: An integer that specifies the number of seconds that Silk Test Classic waits fo the main window of the application to appear.
  • For more information about how the Start method uses these parameters when they are passed to it by Invoke, see Start Method (MainWin).

Example

[ ] // in declarations
[-] window DialogBox Find
	[ ] tag "Find"
	[ ] parent TextEditor
	[ ] // ...
[ ] WINDOW wInvoke = TextEditor.Search.Find
[ ] 
[ ] // in script
[ ] TextEditor.Invoke()
[ ] Find.Invoke()