Re: Fiji grabs focus during long scripts

Posted by Jan Eglinger on
URL: http://imagej.273.s1.nabble.com/Fiji-grabs-focus-during-long-scripts-tp5023556p5023558.html

Hi Aryeh,

I'd recommend using 'setBatchMode(true)' in macros whenever possible to
prevent new windows from being opened.

Other than that, you can use any other supported scripting language
(e.g. Groovy or Jython) to interact directly with the Java API of
plugins, and work with objects headlessly instead of having to rely on
the active image window.

Cheers
Jan


On 22.06.20 16:20, Aryeh Weiss wrote:

> When I am running a script that takes some time, I do other things like
> deal with email, use a text editor or LaTeX, etc. the problem is that
> during the script, Fiji often grabs focus  ( presumably when it displays
> an image window, or maybe also when it displays any window). When this
> happens, whatever I have been typing  is picked up by Fiji as shortcut
> keys, and it usually messes up whatever is running.
>
> Can this behavior be prevented? Is there a way to prevent ImageJ form
> grabbing focus during execution of a script?
>
> Tnx in advance
> --aryeh
>

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html