Login  Register

Re: MultiMeasure prompts user to click ok

Posted by Sarah W. on Jul 15, 2010; 7:17am
URL: http://imagej.273.s1.nabble.com/MultiMeasure-prompts-user-to-click-ok-tp3687622p3687627.html

Hi All,

just letting you know that i have detected (and defeated) the troublemaker in my multi measure macro. what was causing the prompt was the use of the "Close All Without Saving" plugin!

while the following script:

>>>>>>>>>>>>>>>>>>>
i=1;
while (i<4) {
  for(j=1; j<6; j++) {
 newImage("Gray"+j, "8-bit Ramp", 512, 512, 1);
  }
 
  run("Images to Stack", "title=Gray keep");
 
  makeRectangle(61, 73, 85, 72);
  roiManager("Add");
 
  roiManager("Multi Measure");
  selectWindow("Results");
  saveAs("Measurements", "C:\\temp\\ij_test"+i+".xls");
 
  roiManager("Delete");
 
  run("Close All Without Saving");
 
  i++;
}
>>>>>>>>>>>>>>>>>>>>>>>>>>>>

causes the prompt, replacing the line  

>>>
  run("Close All Without Saving");
>>>

with a simple loop:

>>>
 for (j=1; j<6; j++) {
  selectWindow("Gray"+j);
  run("Close");
  }
>>>

gives me the peace and quiet i was looking for while the macro does all the work :)
thanks heaps for your input!

cheers

sarah