The batch mode
One common operation you will probably need to do at some point is to apply a macro to a large number of images. You have an option of using the setBatchMode(arg)
function and code the logic for opening and closing each file. However, there is a simpler way of accomplishing this, which is just navigating to the Process | Batch | Macro... menu option. When you run it you will get a dialog similar to the following one:
This dialog will allow you to apply a macro to all the images contained inside a given folder (Input...) and will store the result into another one (Output...) with the image format selected in the Output Format option. If you leave the output folder field empty, nothing will be saved (you may want to do this if your macro consists of a list of measurements and does not involve any image modification). You can write your macro code in the textbox or in an open (Open...) one that you have coded previously. The Test button runs the macro on the first image of the...