Execute queries successivly from all tabs

Hello,

Is it possible to execute queries successivly one by one if I open many tabs.
I mean, if the query of first tab is executed, switch automaticaly to the second tab and execute query etc.

Thank you.