http://imagej.273.s1.nabble.com/Non-modal-dialog-with-Yes-No-Cancel-tp5024006p5024041.html
Thanks. I didn't realize that the -p option will open a new imagej panel
and assign it the specified port number; obvious now.
which does the equivalent of Ctrl-R inside imagej, albeit using F9 instead.
WindowManager.getAllNonImageWindows(); and change its title.
> I do this today from the command line via a small wrapper macro. I have
> the "multiple instances listener" on.
> The command line options I use from my external editor (EditPlus) is
>
> -macro "C:/Users/steinr/ImageJ/Generic/Macro Compile Plugin.ijm"
> "$(FilePath)"
>
> And the content of "Macro Compile Plugin.ijm" is
>
> file = getArgument();
> print("compile=" + file);
> run("Compile and Run...", "compile=" + file);
>
> The use of an extra macro causes a delay of a second or two but it is
> still much faster than doing it via the GUI. Multiple compiles do not
> launch a separate instance. I still need to activate ImageJ though as it
> is not brought to the foreground (and it should not).
>
> I am doing this on Windows but it should work on any system.
>
> Regarding ports, I usually have three instances of ImageJ running when
> working at the lab. I launch these using the -port option from my Windows
> scripts that controls the workflow. So I have a dedicated port number for
> batch jobs that may take hours to execute, a second one for medium long
> import-and-export jobs that may take a couple of minutes, and a third
> "normal" one with the default port number and multiple instance listener
> active for everything else that was launched without specifying a port
> number. This works great and there are zero conflicts.
>
> I use a small JavaScript snippet to change the title of each ImageJ main
> window to be able to separate these, to avoid closing the long job
> instance by mistake. The two dedicated batch instances have batch mode
> always on, so that no windows pop up from these. I can inspect their
> progress in the Log window. I do nearly everything from the command line
> or registry connected scripts, so that I can just right click a file or
> folder and specify what to do. The only drawback from this is that there
> is no easy way to identify which ImageJ instance each of the three Log
> window belongs to. So I always have something verbose written there, so I
> can see which job the window is running.
>
> Stein
>
> -----Original Message-----
> Sent: 12. oktober 2020 21:54
> Subject: Re: Non-modal dialog with Yes No Cancel
>
> Greetings,
>
> I would like to compile and run a plugin in the currently running imagej
> instance from the commandline. The -o options tends not to work, i.e.,
> left over lockfile(s) or lockfile pointing to imagej instance on another
> workspace (linux). Is there a ways to find an imagej instance's port
> number from within imagej? The -p option seems to work if you guess the
> port number correctly.
>
> Thanks,
>
> Fred
>
> gvim:
> map <silent> <F9> :silent w<bar>!imagej -o -e 'run("Compile and
> Run...","compile=%:p");'<CR>
>
> On Mon, October 12, 2020 11:27 am, Stein Rørvik wrote:
> ...
>> use an external editor which launches ImageJ via the command line when
>> writing or testing new macros.
> ...
>
> ---
>
> --
> ImageJ mailing list:
http://imagej.nih.gov/ij/list.html>