Definig keywords?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Definig keywords?

Olli Visuri
Dear All,

I'm new with ImageJ and I have a simple problem. I have created a plugin
that has two different numeric fields. This works fine, but now I would
like to create a macro which uses this plugin and when I'm using the macro
recorder to create the macro, these numeric fields has the same keyword.
This causes error to the result, because the plugin uses only first number
as the parameter in both numeric fields. So how can I define these
keywords?


Thank you!

-Olli Visuri

--
Olli Visuri, M.Sc. (Tech.)
Lab. of Chemical Engineering and Plant Design
Helsinki University of Technology
P.O. Box 6100, FI-02015 HUT, Finland
email. [hidden email]
Reply | Threaded
Open this post in threaded view
|

Re: Definig keywords?

Wayne Rasband
> I'm new with ImageJ and I have a simple problem. I have created a
> plugin that has two different numeric fields. This works fine, but now
> I would like to create a macro which uses this plugin and when I'm
> using the macro recorder to create the macro, these numeric fields has
> the same keyword. This causes error to the result, because the plugin
> uses only first number as the parameter in both numeric fields. So how
> can I define these keywords?

The keywords generated by the macro recorder are based on the first
word of the field label. For example, if a dialog box has two numeric
fields with these labels

     Sensor Width: ______
     Sensor Height: ______

then the recorder will record two identical "sensor=" labels. There are
two ways around this problem. Either change the labels so the first
word is unique, for example

    Width of Sensor: ______
    Height of Sensor: ______

or use underscores

     Sensor_Width: ______
     Sensor_Height: ______

-wayne