close multi tabs

Features wanted...
Post Reply
zzjean
Posts: 81
Joined: 22 Nov 2009 14:56

close multi tabs

Post by zzjean »

Good evening
Is it possible to close any multiple tabs with a single command or click?
For example in Firefox, I can select tabs (with + CRTL click) and then with a single click, close them all at once.
Maybe it already exists - I searched, but couldn't find anything like it.
I think that would be handy
Thank you

highend
Posts: 13033
Joined: 06 Feb 2011 00:33

Re: close multi tabs

Post by highend »

No there isn't but XY has scripting support?

Code: Select all

    $cntTabs = gettoken(get("tabs"), "count", "|");
    $paths = "";
    while ($i++ < $cntTabs) {
        $name = tab("get", "name", $i);
        if ($name == "") { $name = tab("get", "caption", $i); }
        $paths .= $name . "|" . $i . "|" . "*" . <crlf>;
    }

    $ids = inputselect("Check tab(s) to close...", $paths, <crlf>, 1+2+32+128+1024+8192+16384, , 500, 600);
    $cntClosed   = 1;
    $firstClosed = false;
    foreach($id, $ids, <crlf>, "e") {
        if ($firstClosed) {
            $id -= $cntClosed;
            $cntClosed++;
        }
        tab("close", 0, $id);
        $firstClosed = true;
    }
One of my scripts helped you out? Please donate via Paypal or paypal_donate (at) stdmail (dot) de

zzjean
Posts: 81
Joined: 22 Nov 2009 14:56

Re: close multi tabs

Post by zzjean »

ok thank you. Its Nice and it does what I want. But it don't give me the name of the pane
Attachments
Presse-papiers-20231212.png
Presse-papiers-20231212.png (13.14 KiB) Viewed 157 times

highend
Posts: 13033
Joined: 06 Feb 2011 00:33

Re: close multi tabs

Post by highend »

Get the code again, I've changed it slightly
One of my scripts helped you out? Please donate via Paypal or paypal_donate (at) stdmail (dot) de

zzjean
Posts: 81
Joined: 22 Nov 2009 14:56

Re: close multi tabs

Post by zzjean »

Hi,
Thank you very much it works perfectly now
It's fine and very useful.

Post Reply