Posted by
Jerome Mutterer-3 on
Nov 16, 2014; 10:38pm
URL: http://imagej.273.s1.nabble.com/Listening-on-commands-tp5010468p5010469.html
Dear Filip,
IJ 1.47o4 introduced a new Recorder constructor: new Recorder(boolean
visible).
So you can silently create a a Recorder with:
Recorder r = new Recorder(false);
and at any time, retrieve the recorded macro:
String recordedMacro = r.getText();
that will contain both commands and parameters.
Sincerely,
Jerome.
On 16 November 2014 21:28, Filip Sedlak <
[hidden email]> wrote:
> Hi,
> I wonder if it's possible to access both the currently performed command
> and its parameters. Something similar what Plugins > Macro > Record does
> but from a plugin.
>
> I'd like to do an analysis of the user's actions and I need to get the
> performed operations without asking the user to e. g. copy-paste the
> recorder output to an external app.
>
> Using Executer.addCommandListener gives me only the command name and not
> its parameters. I started playing with ij.plugin.frame.Recorder, trying to
> patch it to support attaching listeners. The listeners would be notified
> with similar information like what is added to the text area.
>
> Can you see a simpler way to achieve this? Most importantly, it would be
> great if I could avoid running a patched version of the application.
>
> Thanks,
> Filip
>
> --
> ImageJ mailing list:
http://imagej.nih.gov/ij/list.html>
--
Jerome Mutterer
CNRS - Institut de biologie moléculaire des plantes
12, rue du Général Zimmer
67084 Strasbourg Cedex
T 0367155339
www.ibmp.cnrs.fr
--
ImageJ mailing list:
http://imagej.nih.gov/ij/list.html