Edit

Deploying Scripts

Scripts are (normally) stored within the MoneyWorks document itself. If you want to move them to another MoneyWorks file, you can copy the text out of the script window, then create an empty script in the other document and paste it in there.

Alternatively (and easier) scripts can be saved as an xml file. When such a file is double-clicked in the FInder or Windows Explorer, MoneyWorks will offer to install it into the currently open/connected document. This means you can easily send scripts to other MoneyWorks users.

To save a script:

  1. Select the script to deploy by clicking on its name on the sidebar
  1. Click on the Cogs icon on the bottom left of the script window and select Save Selected Script as XML

The standard file dialog will open

  1. Choose the location (and name if desired) for the xml script file and click Save

Note that the file extension must be .mwxml. A copy of the script will be saved as a file in the nominated location.

Other options in the cogs menu:

  • Save all scripts as XML: All scripts will be saved in a single .mwxml file. If such a file is double-clicked (with a MoneyWorks document open), you will be prompted to install each script separately.
  • Copy Script as XML: The script will be copied to the clipboard as XML (and can be pasted into another MoneyWorks file).
  • Copy Script as Styled HTML: The script will be copied as html—handy for documenting your script. The script below was copied in this manner:
  • constant meta = "Hello World"
    on Load
        alert("Hello World")
    end

Deploying selected scripts

You can highlight more than one script (and/or UI Form Layouts, which are also displayed in the sidebar) by Cmd/Ctrl clicking on each one in the sidebar. The cogs pop-up menu then has the option to save the selected scripts.