waitForUser in jython?



Hi all,

I’m rewriting a macro that I did a couple of months ago this time in Jython, but I can’t seem to find a good solution for replacing the waitForUser command. Found it in Java and the macro language however.
Am I missing something ?

Thanks a lot.


Hi lguerard -

The beauty of jython is that you can access (more or less)
everything provided by java. You can use not only jdk-provided
java classes, but – more to the point – all of the ImageJ /
Fiji java classes (and ImageJ / Fiji is written in java, so
that means more or less all of Fiji).

So if you know how to do waitForUser in java, you can do
it in your python (jython) script:

from ij.gui import WaitForUserDialog
myWait = WaitForUserDialog ("myTitle", "myMessage")

Thanks, mm


That indeed seems to work very well ! Thanks :slight_smile: