MoneyWorks Manual
CloseWindow (windowRef)
Result Type: none
Definition: Closes the window.
Normally, a script should not need to close a window. The user will do that via the close box, or the OK or Cancel buttons. If you do need a window to close without explicit user interaction, you can use CloseWindow. In the case of modal windows, CloseWindow can only be used with the topmost window. CloseWindow is usually asynchronous i.e. the window will not close immediately the function is called, but when it is safe to do so. Although you should not rely on the validity of the window handle after calling CloseWindow, may still get handler calls for the window.
Availability: available within MWScript handlers.