Login  Register

run multiple instances of the same macro

Posted by John Alexander-7 on Mar 04, 2008; 6:33am
URL: http://imagej.273.s1.nabble.com/run-multiple-instances-of-the-same-macro-tp3697032.html

Hello group,

I wrote a macro to batch process a folder for image analysis.

When I run it it prompts me for a directory to process then off it goes
crunching away on each image in that folder.

All runs well.

What I would like to do is run it on multiple directories simultaneously.

I tried running it on directory #1, then running the macro again and
choosing directory #2.  But I get an "image is locked" error.  I guess
this is referring to the fact that the macro opens an image and creates
another image, then saves the result, then closes both images.  But when
I run more than one instance of the macro - I have more than just those
two windows open and the close() command tries to close the wrong window
(or a window that was opened by the other instance of the macro).

Is there a way I can separate them so this is avoidable?

John