Edit

Load

The MWScript main entry point.

Automatically called:  When your script is loaded. Scripts in the document are usually loaded when you open or connect to a MoneyWorks document.

Use for:  To do any initialisation you need (such as loading persistent values from the database), or, if your script is to be manually invoked from the Script Editor, this is the main entry point for your script.

Return value:  ignored

Example :

on Load
    Alert("Hello World!")
end

Note: You should not normally do anything that invokes a modal user interface (like Alert) in a Load handler for a script that will load every time you log into the document. The exception would be if your are just testing something out. In this case, you should use Run Once to Load and Unload the script so that it will not be saved as active and run for everyone when they log in.