17 Automation and IDEAScript
CHAPTER 17 IDEASCRIPT IS A PROGRAMMING tool in IDEA that allows for combining numerous steps into a single procedure. The programming language is similar to that of Microsoft’s Visual Basic for Applications. IDEAScript files are also known as macro files. It is a file that performs a series of actions when executed. IDEAScript can record actions for editing and modification to make the macro good for general use— any user can apply the script to any suitable data files. IDEAScript is a powerful tool that speeds up repetitive procedures. IDEAScript can be used for: In using IDEAScript, work will be performed faster and the results will contain fewer errors. The analyses are done more consistently and can be undertaken by other staff members. Standards are adhered to by all users. The following steps should be considered when planning to create an IDEAScript. Visual Script can create and edit macros in IDEA. Visual Script is a visual representation of batch processing that allows for simple dragging (or double clicks) of desired action choices from the left side of the window to the right side for project steps of the Visual Script screen, as shown in Figure 17.1. Visual Script, like IDEAScript, allows for automation of repetitive tasks. However, the automation can be performed without the complexity of knowing any programming and writing code. While easier to use, there are limitations, such as not being able to create message boxes, nor will Visual Script run in the IDEA Server environment. Visual Scripts have the .vscript filename extension and are saved to the default Macros .ILB folder under the active project folder. Visual Scripts can be later converted to IDEAScripts, if desired, through an option in the Visual Script Editor. Because of the easy conversion to IDEAScript, you can start the steps for your macro in Visual Script, convert it to IDEAScript, and then code additional functionalities within the IDEAScript editor. Visual Script has the ability to include IDEAScripts into it. This makes it simple to group together a number of IDEAScripts and have Visual Script run them all. Visual Script is an excellent personal tool. IDEAScript is much more powerful than Visual Script. Because of its power, it is rich in abilities that allow flexibility in creating macros. IDEAScript can use dialog boxes, control other software applications, and interact with the operating system. An example of the IDEAScript editor window with a sample script is shown in Figure 17.2 IDEAScripts can be saved in three different formats designated by the filename extension. Each format has its own unique advantage. This book does not go into the details of programming IDEAScripts. The purpose is to provide an overview of both the simplicities of creating basic scripts and the complexities of creating scripts with user interface dialog boxes and performing intricate procedures. Complex scripts are included in this book’s companion website. While complex scripts may have thousands of lines of code, the one in Figure 17.3 has merely 11 lines. The script in Figure 17.3
Automation and IDEAScript
CONSIDERATIONS FOR AUTOMATION
Visual Script versus IDEAScript
CREATING IDEASCRIPTS