IDEA Tech Tip: How to Create an IDEAScript (Part 1)
Q: What are the different ways I can create an IDEAScript?
A: There are multiple ways to do this in IDEA. The first and probably most obvious is to go to the Macros ribbon and select IDEAScript.
This will bring up the IDEAScripting editor. From there you can start to create your script (you can also use other editors such as NotePad++ to write your script). While this is probably the most obvious way to create a script, it is also probably the most challenging. Luckily there are many other ways that IDEA simplifies the script writing process.
The next way is to Record Macro, an option that can be found in the Macros ribbon.
Once you start recording a Macro, IDEA will capture the script for all the analysis you perform until you hit Record a Macro a second time. Once you stop recording, IDEA will give you a dialog to create your macro as a Visual Script or an IDEAScript.
The next option is to first create a Visual Script, run it once and then convert it to an IDEAScript.
Another option is through the Project Overview. First open the Project Overview, then select the Create Macro option.
You can then select the tests you want outputted to IDEA.
The items in red have been deleted from your project, but you can recreate them if you have the source files.
Once you close the Project Overview the IDEAScript editor will open up with the script to create the selected files.
The final and my preferred way of getting an IDEAScript from IDEA is through the history. In this example we can see the different history entries.
I’ve imported the file from Excel, then did an export, an index and finally performed the Benford’s first digit test. If I open up the final test the history will give me what was performed along with the IDEAScript to recreate this test. Right clicking over the IDEAScript code gives me several options.
I can copy the code and paste it into an editor, I can copy the selected task and have it open in the IDEAScript editor or I can copy all the IDEAScript for this file and copy it to the IDEAScript editor. What you select depends on what you want to do. Selecting the “Copy all IDEAScript” option allows me to re-perform all the tests needed to obtain this file. If I just select “Copy the IDEAScript for the selected task(s)” I only get the code for those tasks.
As you can see there are multiple ways to create a script in IDEA depending on your knowledge of scripting. For the expert you can jump right into the editor and start programming. For the novice or someone starting to learn IDEAScript you can use the record or history to first have IDEA create the analysis and the script and then go in and modify it. I usually start with the editor but perform the analysis in IDEA and then copy it from the history to the editor and then modify it.
– Brian Element, IDEA certified instructor and Financial Advisor at Public Works and Government Services Canada
For more tips or to ask your own IDEA question, visit www.ideascripting.com.
About Alain Soublière:
Alain Soublière has many years of experience working with computer audit software. He worked in a senior management role as the IDEA Product Manager for many years before becoming Director of Product strategy for CaseWare Analytics and more recently the Chief Product Strategist.
Connect: Alain Soublière