Re: Command to see whats happening in my macro?
Posted by
Pariksheet Nanda on
Oct 27, 2012; 12:40pm
URL: http://imagej.273.s1.nabble.com/Command-to-see-whats-happening-in-my-macro-tp5000523p5000556.html
On Fri, Oct 26, 2012 at 9:03 AM, Rose Wilson <
[hidden email]> wrote:
> I have tried both of these, but it comes up with the error
>
As Michael explained, I neglected to point out that both the functions
need a parameter.
The macro function documentation page explains that IJ.log(string)
needs a string, and showProgress(progress) uses a number between 0 and
1:
http://imagej.nih.gov/ij/developer/macro/functions.html> Is there a certain place it should go?
>
You could put the progress indicator as the first statement in your "for" loop.
To use showProgress you could add this 1 line right after the "for"
statement (I'm redundantly including 1 statement before and after for
context):
for (i=0; i<list.length; i++) {
showProgress((i+1) / list.length);
name = list[i];
...or if commands you are running in the loop are using their own
progress bar clouding the progress of your macro, you could add this 1
line instead:
IJ.log("Processing file " + i+1 + " of " + list.length);
> Many thanks,Rose
Pariksheet
--
ImageJ mailing list:
http://imagej.nih.gov/ij/list.html