wnd.appRelease Method


exitCode = appRelease(bTerminateApp);

Detaches the application and optionally terminates it. You would typically call this function only to close an application because all applications are detached automatically when the script ends.

Parameters

bTerminateApp
Required. If true then application is requested to shutdown.
exitCode
Returned. The exit code returned by the application.

Example

// Create the object used to access the application
var app = new ActiveXObject("Wrappers.WNDWrapper");
app.appExecute("SampleWinCtrls.exe");

// Alternatively if the app is already started we could attach it
//app.appAttach("\\.*SampleWinCtrls"); // example of a regular expression match

// Create an instance of the main window object
var SampleWindow = new mainwnd(app);
SampleWindow.testAll();

// Close the application
app.appRelease(true);
		

See also

wnd Overview | wnd.appAttach | wnd.appExecute

 


© 2003 Lightweight Technologies. All rights reserved.