Changing files and criteria/formulas
lgoldsmith
Forums
I am new to scripting and have a few questions:
1. If I create a script based on a specific file and later want to run that script on another file, how do I do it without having to go into the script and modify the file? Is there a way to create a script not based on a specific file but just the open file in IDEA?
2. I have criteria to enter into a script but have been told it isn't possible. Is it possible to enter criteria/formula into the script?
Thanks for your help.
Hello and welcome to the site
Hello and welcome to the site.
Yes there is a way to obtain the file through a dialog using the following code:
You would then use sFilename variable in place of the filename.
For the second question, it is possible but you can't use the equation editor. You could create a dialog with an edit box to put the equation in or you could use an inputbox, but there would be no error checking. You can also add varaibles to an equation. So if you have an equation such as AMOUNT > 1000 you could change the field and/or the amount through a dialog or inputbox.
You might want to check out the videos I have created on makimg a simple script, this might help you out.