Prevents the script from exiting automatically when its last thread completes, allowing it to stay running in an idle state.
PrevSetting := Persistent(Setting)
Type: Boolean
If omitted, it defaults to true.
If true, the script will stay running after startup completes and all other threads have exited, even if none of the other conditions for keeping the script running are met.
If false, the default behaviour is restored.
Type: Integer (boolean)
This function returns the previous setting; either 0 (false) for disabled or 1 (true) for enabled.
By default, the script is not persistent. However, it becomes persistent automatically under certain conditions, specifically in common cases where the user would want it to keep running, such as when responding to hotkeys, executing timers, or displaying a GUI.
It is usually unnecessary to call this function, but there are some cases where it might be needed:
If this function is added to an existing script, some or all occurrences of Exit might need to be changed to ExitApp. This is because Exit will not terminate a persistent script; it terminates only the current thread.