Text window name?
Posted by Gabriel Landini on
URL: http://imagej.273.s1.nabble.com/Text-window-name-tp3699442.html
Hi,
I am curious about this:
Below is the SineCosineTable2.txt macro from the IJ site, why does one have to
surround the title in "[ ]" to create the table and print to it, but use the
same string without "[ ]" to test whether it is open?
-------8<--------
requires("1.38m");
title1 = "Sine/Cosine Table";
title2 = "["+title1+"]";
f = title2;
if (isOpen(title1))
print(f, "\\Clear");
else
run("New... ", "name="+title2+" type=Table width=250 height=600");
print(f, "\\Headings:n\tSine\tCosine");
for (n=0; n<=2*PI; n += 0.1)
print(f, n + "\t" + sin(n) + "\t" + cos(n));
-------8<--------
Thanks,
Gabriel