Scripts in TextWorks


Several years ago, Inmagic radically increased the power of their software by generating a scripting capability. A wide variety of operations can now be incorporated into form and screen designs using scripts. For those who enjoy working with computers, or who feel a little adventurous, Maxus does recommend that you learn more about scripting.

Here are some examples of actions that can be facilitated by the use of scripts in TextWorks:

  • Duplicate a record but leave certain fields empty in the new record
  • When a record is saved, add the latest session information (name of person editing the record, time and date of edit transaction) to an audit trail field
  • Automatically add certain pre-defined search criteria into a query screen; or: prompt the user for certain search criteria
  • Print all of the library's overdue notices in a specific report form on the click of a single button
  • In an organisation with multiple TextWorks menu screens, add script buttons to each screen that enable users to click to move from menu to menu
  • Automatically fit a window to a form or a screen as soon as that form or screen is opened
  • On the click of a single button, export a search set to a .DMP file omitting certain unwanted fields
  • In a query screen, create customised help messages for each field; these can be opened by users on the click of a Help button
  • Send a report by email by clicking on a button
  • In case a user types "AND", "OR" or "NOT" in a query screen, a script can be written that automatically changes these words to the Inmagic "&", "/" and "!" symbols

You can learn about scripting by using the Help screens in TextWorks. These screens set out all of the events and objects that can be implemented using scripts, plus they offer a variety of sample scripts that you can try for yourself. The resources found on Inmagic's web site are also very useful — go to http://www.inmagic.com, click on the Support button then follow the prompts to open the Customer Extranet. Within the Extranet, you can click on either Online User Forums or Script Library to find two web pages that will help you get started with scripts.

You can also come to Maxus Australia with your scripting questions. We can assist you with your own scripts or we can write scripts for you. Bear in mind, too, that we are able to run a short workshop that teaches the basics of scripts in TextWorks. If you are interested in taking part in the workshop, please contact us for more details.

If you would like to try a simple script for yourself, have a look at our tips on using a script to run 'Fit Window to Form' or using a script button to open linked files.