i made/modified a function (that works) based on some code that i found here that highend (i believe) posted in another thread. when reviewing the help file i see that you can close a tab by index; however, i didn't see a way to close it by caption name. it's probably possible to nest some commands into a one-liner, but i was not successful.
here is the function i am using (which is called in the script when processing each pane separately) :
Code: Select all
function closeSearchResults() {
$i = tab("get", "count")+1;
while ($i-- > 0) {
$tabCaption = tab("get", "caption", $i);
if ($tabCaption LikeI "Search Results*") {
tab("close", 0, $i);
}
}
}