getResult("Column", row)

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

getResult("Column", row)

Simon Roussel
Hi,
In the macro language, getResult("Column", row) requires that "Column" is a
"Results" window column label, such as "Area", "Mean" or "Circ.".
It means one must know what has been measured.
Is there a way to "get" the measurements column labels ?
Otherwise, it would be nice if "Column" could be the column index.
 
(I am trying to write a macro to reformat the Result window, after
measurements have been made).
Thanks
Simon
 
Reply | Threaded
Open this post in threaded view
|

Re: getResult("Column", row)

Gabriel Landini
On Tuesday 12 December 2006 10:41, Simon Roussel wrote:
> Hi,
> In the macro language, getResult("Column", row) requires that "Column" is a
> "Results" window column label, such as "Area", "Mean" or "Circ.".
> It means one must know what has been measured.
> Is there a way to "get" the measurements column labels ?
> Otherwise, it would be nice if "Column" could be the column index.


selectWindow("Results");
text = getInfo();
lines = split(text, "\n");
columns = split(lines[0], "\t");

if (columns[0]==" ")
 columns[0]= "Number";


The array "columns[ ]" contains the column labels.

Regards,

Gabriel