PreviewXMLtoPDF and merging output documents

MoneyWorks Gold 9.1.7 has a new function for converting the "xml" output format (from DoReport and DoForm) to PDF. On its own, this isn't especially useful, since you can just output to PDF in the first place. However, it is … Continue reading

Posted in Esoterica, MWScript | Comments Off on PreviewXMLtoPDF and merging output documents

XOR handler

MWScript doesn't have a bitwise XOR function, but it does have an AND with ones-complement function in ClearFlag, which provides a bitwise NOT, which can be used with TestFlags (which is bitwise AND) to do a NAND. Thus you can … Continue reading

Posted in MWScript, Sample Code | Comments Off on XOR handler

MoneyWorks Webhooks

Although not a specific "feature" of MoneyWorks, webhooks (i.e. initiating a scripted action in MoneyWorks via a URL) can be easily implemented using a special custom report. This relies on three other MoneyWorks features: Reports can be invoked using the … Continue reading

Posted in MWScript, REST | Comments Off on MoneyWorks Webhooks

SendSMTPMail

SendSMTPMail is a script handler you can implement that takes over the job of sending SMTP mail. The handler signature is: SendSMTPMail(recipients, attachmentPath, subject, message, attachmentFileName) When MoneyWorks 9 has an email + attachment to send and the preferences are … Continue reading

Posted in MWScript, Sample Code | Comments Off on SendSMTPMail

Custom edit field special properties

MoneyWorks Gold 8 allows you to create new windows that can be used with scripts. The UI form editor allows you to set the type (text/number/date) and numeric format of an edit field, but there are some other useful modes … Continue reading

Posted in MWScript | Comments Off on Custom edit field special properties

Sorting Filters

In MoneyWorks Gold 7.1.4, it is now possible to use CreateSelection() with the "*Found" and "*Highlight" metasearches to access more tables and list windows than were previously possible (e.g. department, offledger, filter). Access to the transaction selection in the Creditor … Continue reading

Posted in Sample Code | Comments Off on Sorting Filters

Make the Bank Transfer dialog remember the From and To accounts

If you are doing a lot of bank transfers, you might want to have one or both of the bank account popups remember their settings, at least for the session. Here's a script that does that. constant meta = "Cognito … Continue reading

Posted in MWScript, Tip du Jour | Comments Off on Make the Bank Transfer dialog remember the From and To accounts

Script Editor automatic backups

When you activate a script in the script editor (which compiles and loads the script), the script editor first saves a backup of the script's text into the standard plugins† Scripts folder. In the event that your script goes into … Continue reading

Posted in MWScript, Tip du Jour | Comments Off on Script Editor automatic backups

Base64 encoding

Connecting to the REST service on a Datacentre requires Authorization headers that need to be base64 encoded. As of v7.1.3 there is no built-in intrinsic function to do base64 encoding, so here's a utility routine to do it in MWScript … Continue reading

Posted in MWScript, Sample Code | Comments Off on Base64 encoding

MWScript

MoneyWorks native scripting language Rationale Since v4.1, MoneyWorks has supported customisation via platform-specific attached helper scripts. On Mac, this was via a Helper.scpt Applescript in the Scripts folder, and on Windows via a slightly more convoluted mechanism to invoke a … Continue reading

Posted in MWScript | Comments Off on MWScript