As a demo, I put the macro below into a text window and ran it twice. So these two macros, identified by starting time, ran in parallel. While the text window was active, I chose menu Debug>Abort. But I only could abort the second macro.
This happens often, when I debug something and forget to abort before installing the improved text.
Something even worse happened when a program bug entered an infinite loop without wait() statement. Running invisibly in the background, it drowned my battery in no time.
Wouldn't it be better if Debug>Abort aborts all running macros? It also would make sense that if you install macros from a text window, any previously macros (from the same window?) could be killed.
macro "A"{
startTime = getTime%1000;
for(jj = 0; jj < 1000; jj++){
print("started: " + startTime + " jj=" + jj);
wait(1000);
}
output:
=======
started: 196 jj=0
started: 196 jj=1
started: 196 jj=2
started: 196 jj=3
started: 196 jj=4
started: 196 jj=5
started: 821 jj=0
started: 196 jj=6
started: 821 jj=1
started: 196 jj=7
Norbert Vischer
--
ImageJ mailing list:
http://imagej.nih.gov/ij/list.html