Scripting in Text Works
Text Works incorporates scripting functionality that can add ease of use features and extra features to your Text Works screens and forms. For those who enjoy working with computers, or who feel a little adventurous, we recommend that you learn more about scripting.
Here are some examples of actions that can be facilitated by the use of scripts in Text Works:
- 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 Text Works 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 Text Works. 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 Inmagic Script Library for a web page that will help you get started with scripts. You can also join the Customer Forum, which has a thread on Scripting.
Maxus can help with your scripting questions. We can assist you with your own scripts or we can write scripts for you. From time to time we schedule a session in our Technical Workshop series that teaches the basics of scripts in Text Works. If you are interested in taking part in a workshop, please contact us for more details.
NB Scripting in Text Works does not operate in Web Publisher Pro, which requires a different scripting method!