Skip to main content

Load an existing module

Hey everyone,I've just got asked to automate IDEA completely that it would require no user interaction and I was wondering whether this is possible at all.
In IDEA, under the "Tools" toolbar, there are multiple scripts/modules predefied. Currently, people interact and run those manually. I was wondering whether it is possible to actually create a script that calls one of those? The end result will be a user starts a script, which script would load modules that are in "Tools". Is there an API or something I could  check to on how to invoke inbuilt things such as Direct extraction from within a script? By the way, since there's that module existing under Tools, it would be even better if I could just modify those instead wouldn't it though I cant figure out where's the source code for those, they came built in with the installation, does anyone know if I could access the code at all?

Brian Element Fri, 08/21/2015 - 15:39

Hello testpy33 and welcome to the site.

Yes it is possible, you can call one script from another, there is the RunIDEAScript that just runs a script, there is the RunIDEAScriptEX which runs a script and allows you to pass up to four parameters and there is the RunIDEAScriptRV which allows you to run a script and pass back up to four paramaters and there are ways to get around the four parameter limitation.  You can see an example here: http://ideascripting.com/forum/call-script-within-script

Now from your post it sounds like your organization is using a non-standard version of IDEA, I know some of the accounting firms that use IDEA have adapted this.  Generally IDEA comes with no scripts installed and there is no Tools toolbar (I am assuming V9 as I can't remember if there was a tools menu for V8).  Now IDEA allows you to attach scripts to the ribbon for easy access unfortunately I don't think there is a way to see where they are located and if you have a non-standard version IDEA may have been changed to imbed these scripts as part of the software.

Also if you have access to the IDEA support site they have a script which allows you to run multiple scripts that might help out.

So I guess this is along winded answer saying that yes it is possible but you sound like you are in a non-standard environment that I probably need more info about.

Thanks

Brian

 

testpy33 Sat, 08/22/2015 - 08:46

Hey Brian,
Thank you for the warm welcoming!
I am sorry for the quick question yesterday, I was really in a hurry and finishing upon another project.I will try to provide you with more information regarding my issue, perhaps just so you could confirm that it is actually possible as you already did from the information by me earlier, before  I spend hours in it.
To begin with, yes it is IDEA version 9. I would expect that you are completely right on the part that it is non standard environment because the installation contained those pre-made modules (if they are even called modules in IDEA, I am totally new to the environment). Those modules are located in the tools section, i think about 6 of them are available, but I would need to use only 1. When started the one of interest, pops up a gui dialog, that in the financial department fill and data is sampled based on those values. As you probably know, at the end idea just presents a table of all the values that were sampled. 
Now, what I've been asked to do is create a script such that it would import an excel sheet into idea, then start the module, fill the required text fields on the gui that pops up (Values will be read from another excel sheet), sample the data and save the result. What really has puzzled me is starting the module and actually accessing fields in the gui. In a language such as Java or Python and so on, I would need somehow to interface with that gui to fill data in there and since I don't see the source code of the module, I am not sure how to create an instance of it and be able to write values to it. In an usual case, I would create methods such as getValueOfAuditor or setValueOfAuditor etc. I thought, there would be an API that will let me load that module, or interact with the buttons inside idea such as Direct extraction.Would you say based on this that it would be possible? 
I did watch some of the videos on here and I could say that you've done a great job with them.

Brian Element Sat, 08/22/2015 - 09:01

Good morning,

Well what you want to do should be doable, the problem for me is interfacing with your non-standard environment.  Now IDEA out of the box comes with the following ribbons: File, Home, Data, Analysis, View, Macro and SmartAnalyzer, anything else would have been added by your company or through your IDEA distributor for your company.  The thing is I have no idea what those modules are written in, they might have used a different language and some how attached them to IDEA so as to how to interface with those modules I have no idea.  I think for you not to waste your time you need to talk to the people that install or are reponsible for IDEA in your company to find out more about those modules.  If you had access to the scripts it would probably just be a matter of of adapting the script to read the variables from the excel spreadsheet and place them in the varialbes that were obtained from the dialog.  Sorry I can't be of more help on this.

Glad you enjoyed the videos, I plan on doing others, it is just finding the time to do them.

Good luck on your project and let me know if there is anything I can do to help.

Brian

testpy33 Sat, 08/22/2015 - 15:20

Hi Brain,Thank you once again for replying back to me.I will try to get in touch with the developer if possible and if possible actually get hold of the scripts, that would highly decrease the complexity of the task indeed.
Also, I will be checking regularly for new videos!