The MWScript Debugger

MoneyWorks 9.2.1 and later has a debugger for the MWScript scripting language. The debugger can be used to proactively debug scripts by setting breakpoints and stepping through the script line-by-line, or it can be entered if a runtime error occurs, … Continue reading

Posted in MWScript | Comments Off on The MWScript Debugger

Using Sqlite3 with MoneyWorks

MoneyWorks 9.2 introduces bindings to the Sqlite3 API. This means you can: Create and use temporary in-memory sqlite databases in MWScript for data analysis and tabulation (as a more powerful alternative to TableAccumulate etc) Create and/or open local sqlite databases … Continue reading

Posted in MWScript | Comments Off on Using Sqlite3 with MoneyWorks

Using sftp or scp from MoneyWorks to transfer files to/from a remote server

SFTP is a nice and easy protocol for secure transfer of files to/from other servers. It's much easier and more secure than FTP. However, the Curl library in MoneyWorks does not include SFTP (which requires the entire OpenSSH library). However, … Continue reading

Posted in MWScript | Comments Off on Using sftp or scp from MoneyWorks to transfer files to/from a remote server

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

Web views in the MoneyWorks Navigator

You have long been able to add your own panels to the MoneyWorks Navigator. Custom Navigator panels can be implemented using custom invoice forms or custom reports and are loaded from a folder named Navigator Extras in your custom plugins … Continue reading

Posted in Esoterica, MWScript | Comments Off on Web views in the MoneyWorks Navigator

Communicating with Javascript in a Web View

MoneyWorks 9.1 provides modernised web views on Mac and Windows (see New Web Views in MoneyWorks 9.1). MoneyWorks 9.1 and later also provides new functionality for communicating with the content of web views (requires WebView2 Runtime on Windows). Calling out … Continue reading

Posted in MWScript | Comments Off on Communicating with Javascript in a Web View

Server change notifications

External system notification has been implemented in MoneyWorks Datacentre 9.0.2. This allows another server to be notified whenever a change is made in a MoneyWorks database. This will remove the need for external systems to poll for changes (a practice … Continue reading

Posted in Database, MWScript, REST, Servers | Comments Off on Server change notifications

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