showText("a\nb\nc\n");
        waitForUser("Edit text, then click OK");
        newContent = getInfo("window.contents");
        print("\\Clear");
        print(newContent);

showText("string")
Displays a string in a text window.

showText("Title", "string")
Displays a string in a text window using the specified title.

Would be nice to have addTextAreas available in Dialog in macros.

Fred


On Thu, March 20, 2025 5:41 am, Norbert Vischer wrote:
> Hello all,
> Is there a way to present text that can be re-arranged by the user?
> In a somewhat awkward work-around, I used the clipboard and saved it in
> tmp in order to change the window title.
> My question: is there a direct way to do this, kind of
> newTextWindow(title, content)?
>
> Best regards,
> Norbert
>
>
>       title = "My_Title.txt";
>       contents = "lineA\nlineB\n";
>       String.copy(contents);
>       run("System Clipboard");
>       saveAs("Text", getDir("temp") + title);//change window name
>       close("Clipboard");
>       newContent = getInfo("window.contents");
>       waitForUser("Edit text, then click OK");
>       newContent = getInfo("window.contents");
>       print("\\Clear");
>       print(newContent);
>
> --
> ImageJ mailing list: http://imagej.nih.gov/ij/list.html
>

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

Reply via email to