Login  Register

Re: Syntax problem

Posted by Douglas Benn-2 on Dec 05, 2014; 7:35pm
URL: http://imagej.273.s1.nabble.com/Syntax-problem-tp5010791p5010798.html

Dear Michael,

Thank you for the prompt response.  I have tried your suggestion setTool("wand") and WaitForUser("select the particle now"). It does not seem to work but I need to check my code to make sure that is not the problem.  If my code seems OK I will be back asking for more help....

Best wishes.

Douglas


-----Original Message-----
From: ImageJ Interest Group [mailto:[hidden email]] On Behalf Of Michael Schmid
Sent: Friday, December 05, 2014 10:47 AM
To: [hidden email]
Subject: Re: Syntax problem

Hi Douglas,

the doCommand("Command") macro call works only with ImageJ menu commands that can be also used with run("Command"). It is not meant for macro functions.

Anyhow, I see no reason for running the macro function

  doWand(x,y,150.0,"8-connected");

asynchronously. The following commands in your macro would then have an undefined state of the selection, the wand may have finished creating the selection or not.

Do you want the user to click with the wand on a point, to select something? Then use setTool("wand") and WaitForUser("select the particle now")

<by the way, if you want embedded quotes in a String, use either single quotes or backslash-quotes>

Michael
________________________________________________________________
On Dec 5, 2014, at 17:24, Benn, Douglas K. wrote:

> I would be grateful with
> help for the syntax of
>
> doCommand("doWand(x,y,150.0,"8-connected")"); ?
>
> I get an error message
> ')' expected line 961
> doCommand("doWand(x,y,150.0,"<8>-connected")");
>
> Thank you.
>
> Douglas

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

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