http://imagej.273.s1.nabble.com/Add-a-skip-button-to-wait-for-user-tp5017274p5017307.html
Hi.
Good solution. Just do not forget to release shift key with
> Hi folks,
>
> After reading through some related threads, I came across a great way to
> add functionality to the waitForUser dialog - right after the
> waitForUser(); line, add one or more if() statements detecting whether
> shift or ctrl is down. These essentially give branching options from the
> one OK button. I found that this works perfectly for skipping a section
> in a repeated analysis without exiting the macro.
>
> It looks like this:
>
> waitForUser("Select the cilia, or Shift+click to skip");
> if (isKeyDown("Shift") == true) {
> selectWindow(name);
> Run("Close);
> }
> else {
> //all the analysis steps
> }
>
> Best,
>
>
> Tim
>
>
>
> Timothy Feinstein, Ph.D.
> Research Scientist
> University of Pittsburgh Department of Developmental Biology
>
>
>
>
>
> On 10/5/16, 4:52 AM, "ImageJ Interest Group on behalf of Michael Schmid"
> <
[hidden email] on behalf of
[hidden email]> wrote:
>
> >Hi Tim,
> >
> >what about asking the user to close inappropriate images?
> >
> >You could have
> > id=getImageID();
> >before waitForUser, and afterwards check with
> > isOpen(id)
> >whether the image has been closed during the 'Wait For User' phase.
> >
> >Michael
> >________________________________________________________________
> >On 2016-10-03 23:32, Feinstein, Timothy N wrote:
> >> Hello,
> >>
> >> I want to add a button to the wait_for_user dialog. My macro processes
> >>a
> >> large number of images with a single user interaction for each image,
> >>and
> >> once in a while an image comes up that is inappropriate for analysis.
> >>It
> >> is not always easy to detect which images can't be analyzed
> >>automatically.
> >> Does anyone know if you can put a 'skip' button with programmable
> >> functionality (i.e., close active window and move on to the next) in the
> >> dialog?
> >>
> >> Thanks,
> >>
> >>
> >> Tim
> >>
> >> Timothy Feinstein, Ph.D.
> >> Research Scientist
> >> University of Pittsburgh Department of Developmental Biology
> >>
> >> --
> >> ImageJ mailing list:
> >>
https://na01.safelinks.protection.outlook.com/?url=> http%3A%2F%2Fimagej.ni
> >>h.gov%2Fij%2Flist.html&data=01%7C01%7Ctnf8%40pitt.edu%
> 7Cfbab6c8a12e64c4ba
> >>de608d3ecfd0e7b%7C9ef9f489e0a04eeb87cc3a526112
> fd0d%7C1&sdata=Dx8uyu9L8Qyr
> >>gFqpZtabXPxq9by7w6%2FgUxf1Sj%2BiLL8%3D&reserved=0
> >>
> >
> >--
> >ImageJ mailing list:
> >
https://na01.safelinks.protection.outlook.com/?url=> http%3A%2F%2Fimagej.nih
> >.gov%2Fij%2Flist.html&data=01%7C01%7Ctnf8%40pitt.edu%
> 7Cfbab6c8a12e64c4bade
> >608d3ecfd0e7b%7C9ef9f489e0a04eeb87cc3a526112
> fd0d%7C1&sdata=Dx8uyu9L8QyrgFq
> >pZtabXPxq9by7w6%2FgUxf1Sj%2BiLL8%3D&reserved=0
>
> --
> ImageJ mailing list:
http://imagej.nih.gov/ij/list.html>