Login  Register

Re: Macro question

Posted by James Norman on Mar 29, 2007; 7:18pm
URL: http://imagej.273.s1.nabble.com/Macro-question-tp3699928p3699930.html

I tried that method however the icon on the toolbar just toggles, and
does not stay depressed.  It also does not act as a tool, the current
tool is still selected, I need for the icon to behave as a tool and I
need notification when the tool is clicked, before the image is
clicked.  Can anyone think of any way to do this?

Thanks for any ideas you can provide.

JC Norman



On 3/29/07, jerome mutterer <[hidden email]> wrote:

> A tool that runs a macro when the tool's button is pressed
> is called an "Action Tool" and is described at
>
> http://rsb.info.nih.gov/ij/developer/macro/macros.html#tools
>
> Jerome
>
> On 3/29/07, James Norman <[hidden email]> wrote:
> >
> > Hello All,
> > I've developed a plugin that will manipulate an Roi, and I'm having
> > some trouble figuring a good way to install it.  My dilemma is that I
> > need to have an icon in the toolbar for it, but a macro isn't
> > sufficient because I need to change the cursor.  I can't change the
> > cursor because it looks like my macro is only run when I click on the
> > image.
> >
> > Is there a way to execute some code when the macro tool is clicked on
> > the toolbar, before the Image is clicked?  This way I could set up the
> > code for the cursor before the mouse goes over the image region.
> >
> > I also would need to get the Tool id of the marco that was installed.
> > This way I set the cursor only when my tool is running.
> >
> > Let me know if there is another way of adding a tool to the Toolbar at
> > startup other then a macro and adding it to the startup macros.
> >
> > Thanks,
> > JC Norman
> >
>