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.
// 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);
wnd Overview | wnd.appAttach | wnd.appExecute