Macro example error

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

Macro example error

AAM71
Hi,

I am a complete novice to ImageJ and sorry for very stupid question.
I have tried the example in "ImageJ Macro Language" document:

print("[My Window]", "Hello, world");

As I understand it should produce a window titled "My Window" with the
text "Hello, world".
However, ImageJ returns the error Window not found in line 1.

What I am doing wrong?

Sincerely,
Alex
Reply | Threaded
Open this post in threaded view
|

Re: Macro example error

Gluender-3
Alex,

the Macro-functions manual says:

"The second argument to print(arg1, arg2) is appended to a text
window or table if the first argument is a window title in brackets,
for example print("[My Window]", "Hello, world")."

Consequently this routines applies to cases where you already have a
text-window open that, in the example, is named My Window.

To test this, you may create an empty text window from the file menu.
Save it and use the file name for the above print routine.

Works for me.

>Hi,
>
>I am a complete novice to ImageJ and sorry for very stupid question.
>I have tried the example in "ImageJ Macro Language" document:
>
>print("[My Window]", "Hello, world");
>
>As I understand it should produce a window titled "My Window" with
>the text "Hello, world".
>However, ImageJ returns the error Window not found in line 1.
>
>What I am doing wrong?
>
>Sincerely,
>Alex

HTH
--

                   Herbie

          ------------------------
          <http://www.gluender.de>
Reply | Threaded
Open this post in threaded view
|

Re: Macro example error

AAM71
Thank you, HTH!

Unfortunately it did not work for me. I use ImageJ 1.43n on Xp machine.
I have created text file called "My Window.text", opened it in ImageJ,
then created new macro window, pasted
print("[My Window]", "Hello, world")
And it produces the same error: "Window not found in line 1"
The same thing happens with ImageJ 1.43n on MacOS X 10.3.9 machine. So,
it is not something with computers...

Sincerely,
Alex
Reply | Threaded
Open this post in threaded view
|

Re: Macro example error

Gabriel Landini
On Tuesday 05 Jan 2010  11:51:26 you wrote:
> Unfortunately it did not work for me. I use ImageJ 1.43n on Xp machine.
> I have created text file called "My Window.text", opened it in ImageJ,
> then created new macro window, pasted
> print("[My Window]", "Hello, world")

Perhaps you need to use [My Window.text] instead of [My Window].
What name does it show in the title bar?
G.
Reply | Threaded
Open this post in threaded view
|

Re: Macro example error

AAM71
Thank you very much, Gabriel!

You are right! Sorry for being so dumb.

Alex

Gabriel Landini :
> On Tuesday 05 Jan 2010  11:51:26 you wrote:
>> Unfortunately it did not work for me. I use ImageJ 1.43n on Xp machine.
>> I have created text file called "My Window.text", opened it in ImageJ,
>> then created new macro window, pasted
>> print("[My Window]", "Hello, world")