Hi Norbert,

in your second macro, you need
        Table.update(tabName);
after modifying the table.
(If it does not work, there might be a race condition; then you may also need a short delay such as wait(200) before bringing the image to the foreground, to ensure the correct sequence of the display operations.)

The reason is the following:
For performance reasons, during a macro, the displayed tables are not immediately updated when the contents changes. The macro Interpreter remembers that a table was modified and updates the display at the very end. This is what puts your table to the front.

Best,

Michael
________________________________________________________________
On 07.04.24 12:56, Norbert Vischer wrote:
Hello all,

Has anyone an advice how to put the table behind?
In the first macro  I create an image and a table.
In the second macro I want to modify table behind the image - but the table 
occupies the image!


Best regards, Norbert



//======
var tabName = "MyTable.csv";

macro "Create Table and Image [a]"{
        close("ABC");
        close(tabName);
        Table.create(tabName);
        Table.setColumn("Nums", newArray(10), tabName);
        newImage("ABC", "8-bit ramp", 1000, 600, 1);
        run("Maximize");
}

macro "Change table [b]"{
        Table.set("Nums", 3, random, tabName);
        selectImage("ABC");
}

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

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

Reply via email to