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

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

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

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