Copy log content to clipboard


#1

Hi there,

I would like to copy the contents of the log window to the clipboard so then I can paste them somewhere else.

Before Herbie kills me, I have been looking at the ImageJ-macro functions and the only one doing something like I want was
String.copy(str),
but I have no idea how to put the contents of the log window into a string.

Those contents are several rows from the results taking into the log window through:

for (i=0;i<nResults();i++){
d2s(getResult(“Area” ,i),0);
}

Thanks a lot for your help

cheers


#2

Good day,

actually I’ve never killed somebody yet …

Here is a demo macro that does what you’ve described:

print("Here is just some text \non two lines for demonstration.")
theText = getInfo("log");
String.copy(theText);

I simply did a search on
https://imagej.nih.gov/ij/developer/macro/functions.html
for “log”.

HTH

Herbie


#3

I am afraid that “yet” is close to be invalid if I keep asking fool questions like that…

Thanks indeed again and sorry very much (again!!!). I did try but, thick as I might be, couldn´t find what you just found in two sec… I will try harder next time before asking.

Cheers