Edit

Unload

Automatically called:  When the script is about to be unloaded.

Use for:  Use this kiss-off as an opportunity to e.g. save persistent values in the database (although note that in MoneyWorks 8, simple properties can be persistent on clients using a persistent property declaration.

Return value:  ignored

Example :

on Unload
    Say("Goodbye!")
end