GoFiler Legato Script Reference
Legato v 1.5d Application v 5.25a
|
Table of Contents | < < Previous | Next >> |
Chapter Five — General Functions (continued)
Overview
The ExitApplication function posts a quit application state and eventually unwinds the host application.
Syntax/Parameters
Syntax
int = ExitApplication ( );
Parameters
(none)
Return Value
Returns an int as ERROR_NONE or a formatted error code on failure. If the application is a console application, the function will return ERROR_FUNCTION_NOT_SUPPORTED.
Remarks
When running as the foreground process, ExitApplication sets a flag indicating that the application should forcibly terminate by posting a quit message to the application’s message queue after the calling script ends and its script engine is destroyed. The script will continue to execute to a normal exit point at which time the application will terminate. Edit windows are closed without saving or user warning.
Note that unless a script is explicitly run in the background using the RunBackgroundScript function, it is considered a foreground process.
If the function is run within a dialog box, the application will not exit until the script ends.
When running a script as a background thread, a close request is posted to the application frame and all dialogs and message boxes are inhibited.
When running as a console program, the ExitApplication function will fail and return an error. If the application does not has not displayed frame window or the message loop is not running, the function will fail and return an error.
Avoid using ExitApplication in any script that continues to remain active, such as, a hook or background process. The application exit is not processed until the script engine that processed the ExitApplication is destroyed..
If a runtime error occurs after execution of ExitApplication, the script will terminate and application will still exit.
The RunMenuFunction function can also be used with the FILE_EXIT menu code.
Related Functions
Platform Support
Go13, Go16, GoFiler Complete, GoFiler Corporate, GoFiler, GoFiler Lite, GoXBRL
Legato IDE, Legato Basic
Table of Contents | < < Previous | Next >> |
© 2012-2024 Novaworks, LLC. All rights reserved worldwide. Unauthorized use, duplication or transmission prohibited by law. Portions of the software are protected by US Patents 10,095,672, 10,706,221 and 11,210,456. GoFiler™ and Legato™ are trademarks of Novaworks, LLC. EDGAR® is a federally registered trademark of the U.S. Securities and Exchange Commission. Novaworks is not affiliated with or approved by the U.S. Securities and Exchange Commission. All other trademarks are property of their respective owners. Use of the features specified in this language are subject to terms, conditions and limitations of the Software License Agreement.