I have a Macro that is working well. It prompts operator to select an image, does analysis, & ends with 3 image windows, a Summary Window, & a Log Window open for the operator to verify all went well in analysis & record void data.
I would like it to then stop & tell the operator: "Inspect/Verify Voids, & record Void Percentage, then hit Ok for Next Image". At this point it should close all the open windows & Loop back to beginning again & rerun the macro from the beginning. I've tried several things with no success, any help on code to do this would be appreciated. thanks, Steve |
Hi Steve,
can you potentially post at least a part of the code, so we might be able to help more precise. You can pause the macro and display a message with the command: waitForUser("Text"); See also here for additional commands: http://rsbweb.nih.gov/ij/developer/macro/functions.html To loop a part of your macro you have several options depending under which conditions you want it to continue looping. If you know how often it should be repeated, a "for-loop" might be the way to go. If a specific condition will end the loop you might want to use a "while"- or a "do-while"-loop. See here: http://rsbweb.nih.gov/ij/developer/macro/macros.html#loops regards, Jan 2014-12-09 22:23 GMT+01:00 Steve R <[hidden email]>: > I have a Macro that is working well. It prompts operator to select an > image, > does analysis, & ends with 3 image windows, a Summary Window, & a Log > Window > open for the operator to verify all went well in analysis & record void > data. > I would like it to then stop & tell the operator: "Inspect/Verify Voids, & > record Void Percentage, then hit Ok for Next Image". > At this point it should close all the open windows & Loop back to beginning > again & rerun the macro from the beginning. > > I've tried several things with no success, any help on code to do this > would > be appreciated. > > thanks, Steve > > > > -- > View this message in context: > http://imagej.1557.x6.nabble.com/Pause-Macro-Ask-Question-Close-Windows-Loop-back-to-beginning-tp5010861.html > Sent from the ImageJ mailing list archive at Nabble.com. > > -- > ImageJ mailing list: http://imagej.nih.gov/ij/list.html > -- CEO: Dr. rer. nat. Jan Brocher phone: +49 (0)6234 917 03 39 mobile: +49 (0)176 705 746 81 e-mail: [hidden email] info: [hidden email] inquiries: [hidden email] web: www.biovoxxel.de -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html |
Sure, Here is the Code attached. Appreciate the help! Steve From: gankaku [via ImageJ] [mailto:ml-node+[hidden email]]
Hi Steve,
If you reply to this email, your message will be added to the discussion below: To unsubscribe from Pause Macro, Ask Question, Close Windows, Loop back to beginning,
click here. Wafer Void Macro-Prompt for file.ijm (5K) Download Attachment |
In reply to this post by gankaku
Jan, I guess a continual Loop will work ok, they can close IJ to end their session when done I think I need all the Windows to close between each File analysis also. Let me know if there’s an easy way to do that. Thanks, Steve From: gankaku [via ImageJ] [mailto:ml-node+[hidden email]]
Hi Steve,
If you reply to this email, your message will be added to the discussion below: To unsubscribe from Pause Macro, Ask Question, Close Windows, Loop back to beginning,
click here. |
Steve,
A couple of ways to close all of the windows using the macro language: 1. run("Close All”) 2. close(“*”) In general, other than looking at the macro function documentation (http://rsbweb.nih.gov/ij/developer/macro/functions.html), note that you can discover ways of doing things by enabling the recorder (Plugins -> Macros -> Record…) and then watching what is recorded as you use ImageJ. In this example, when I run File -> Close All, the recorder logs run(“Close All”). Alan On Tue, Dec 9, 2014 at 4:31 PM, Steve R <[hidden email]> wrote: > Jan, > I guess a continual Loop will work ok, they can close IJ to end their session when done > I think I need all the Windows to close between each File analysis also. > Let me know if there's an easy way to do that. > Thanks, > Steve > From: gankaku [via ImageJ] [mailto:[hidden email]] > Sent: Tuesday, December 9, 2014 3:19 PM > To: Steve Roach > Subject: Re: Pause Macro, Ask Question, Close Windows, Loop back to beginning > Hi Steve, > can you potentially post at least a part of the code, so we might be able > to help more precise. > You can pause the macro and display a message with the command: > waitForUser("Text"); > See also here for additional commands: > http://rsbweb.nih.gov/ij/developer/macro/functions.html > To loop a part of your macro you have several options depending under which > conditions you want it to continue looping. > If you know how often it should be repeated, a "for-loop" might be the way > to go. If a specific condition will end the loop you might want to use a > "while"- or a "do-while"-loop. See here: > http://rsbweb.nih.gov/ij/developer/macro/macros.html#loops > regards, > Jan > 2014-12-09 22:23 GMT+01:00 Steve R <[hidden email]</user/SendEmail.jtp?type=node&node=5010862&i=0>>: >> I have a Macro that is working well. It prompts operator to select an >> image, >> does analysis, & ends with 3 image windows, a Summary Window, & a Log >> Window >> open for the operator to verify all went well in analysis & record void >> data. >> I would like it to then stop & tell the operator: "Inspect/Verify Voids, & >> record Void Percentage, then hit Ok for Next Image". >> At this point it should close all the open windows & Loop back to beginning >> again & rerun the macro from the beginning. >> >> I've tried several things with no success, any help on code to do this >> would >> be appreciated. >> >> thanks, Steve >> >> >> >> -- >> View this message in context: >> http://imagej.1557.x6.nabble.com/Pause-Macro-Ask-Question-Close-Windows-Loop-back-to-beginning-tp5010861.html >> Sent from the ImageJ mailing list archive at Nabble.com. >> >> -- >> ImageJ mailing list: http://imagej.nih.gov/ij/list.html >> > -- > CEO: Dr. rer. nat. Jan Brocher > phone: +49 (0)6234 917 03 39 > mobile: +49 (0)176 705 746 81 > e-mail: [hidden email]</user/SendEmail.jtp?type=node&node=5010862&i=1> > info: [hidden email]</user/SendEmail.jtp?type=node&node=5010862&i=2> > inquiries: [hidden email]</user/SendEmail.jtp?type=node&node=5010862&i=3> > web: www.biovoxxel.de<http://www.biovoxxel.de> > -- > ImageJ mailing list: http://imagej.nih.gov/ij/list.html > ________________________________ > If you reply to this email, your message will be added to the discussion below: > http://imagej.1557.x6.nabble.com/Pause-Macro-Ask-Question-Close-Windows-Loop-back-to-beginning-tp5010861p5010862.html > To unsubscribe from Pause Macro, Ask Question, Close Windows, Loop back to beginning, click here< > NAML<http://imagej.1557.x6.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml> > -- > View this message in context: http://imagej.1557.x6.nabble.com/Pause-Macro-Ask-Question-Close-Windows-Loop-back-to-beginning-tp5010861p5010865.html > Sent from the ImageJ mailing list archive at Nabble.com. > -- > ImageJ mailing list: http://imagej.nih.gov/ij/list.html -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html |
Free forum by Nabble | Edit this page |