I'm not sure if this really does anything but you can also try using that window and press OK on each of the queries. I'm not sure if it is enough to just press the stop or do you have to also wait for all the queries to be stopped.
This is just an example which hasn't been tested
Names Default To Here(1);
Main Menu("Running Queries");
wait(2);
ws = Get Window List(); // you maybe can trust that last is Running Queries
idx = Contains(ws << get window title, "Running Queries");
mywindow = ws[idx];
gdb = mywindow[GridBox(1)];
// get list of all open queries (not implemented here as I cannot currently test it)
queries = gdb[1] << get;
queryrows = {};
For Each({query, idx}, queries,
If(query != " ",
Insert Into(queryrows)
);
);
gdb << Set Selected Rows({queryrows});
(mywindow << XPath("//ButtonBox[text() = 'Stop']")) << Click(1);
// maybe needs some sort of While loop or Schedule to check if all queries have closed?
-Jarmo