second toolbar

Features wanted...
Post Reply
7iben
Posts: 74
Joined: 04 Apr 2019 18:22

second toolbar

Post by 7iben »

I need a second toolbar.
Either vertical (for example in the middle) or horizontal under the top or at the bottom.
Is that possible? Would be very helpful.

highend
Posts: 13327
Joined: 06 Feb 2011 00:33
Location: Win Server 2022 @100%

Re: second toolbar

Post by highend »

Not at the moment...

You could use a script to switch toolbars with a simple menu (and either make a toolbar button (that you include in every toolbar defined) or bind a keyboard shortcut to the script itself).

E.g.:

Code: Select all

    // text toolbar(); -> Show current toolbar definition

    $tbs = <<<>>>
1. Standard|back,fore,up,-,myco,mru,find,openwith,-,newfolder,copy,cut,paste,del,-,undo,redo,-,tpt,cbx,sfs,-,qns,vfset,visualfilter,tsf,-,tsm,dark,minitree,flatview,views,dp,pp,fp,-,cofi,icf,-,conf
2. Work 1|back,fore,-,myco,hotlist,openwith,-,ctb2,ctb3,ctb17,-,ctb4,ctb5,ctb12,-,ctb6,ctb7,-,ctb1,ctb11,ctb18,ctb13,ctb14,ctb15,ctb16,-,undo,redo,-,ctb8,-,flatview,cofi,tsf,visualfilter,icf,cucopy
    >>>;
    $captions = regexreplace($tbs, "^(.+?)(\|.*?)(?=\r?\n|$)", "$1");

    $sel = popupmenu($captions, 5:=1, 6:=<crlf>);
    if (!$sel) { status "No menu entry selected, aborted!", "8B4513", "stop"; end true; }

    $definition = gettoken(gettoken($tbs, $sel, <crlf>), 2, "|");
    toolbar($definition);
The "1. Standard" is the default XY toolbar configuration and "2. Work 1" is the one I'm using.
In other words: configure the toolbar you need, execute text toolbar(); from the address bar and add it to the $tbs variable in the script.
Give it a title! (the part before the "|") and if you want it to be easily accessible, use a 1., 2., 3., etc. in front of your title so that you can
access it with those number keys...
One of my scripts helped you out? Please donate via Paypal

7iben
Posts: 74
Joined: 04 Apr 2019 18:22

Re: second toolbar

Post by 7iben »

Many Thanks. That works great.
Can someone rewrite this script so that no menu opens, but that the toolbar changes with the script.
I would then create a button for each toolbar.

highend
Posts: 13327
Joined: 06 Feb 2011 00:33
Location: Win Server 2022 @100%

Re: second toolbar

Post by highend »

You just need to call toolbar() with the buttons in it?
One of my scripts helped you out? Please donate via Paypal

7iben
Posts: 74
Joined: 04 Apr 2019 18:22

Re: second toolbar

Post by 7iben »

Excuse me, but I am not at all familiar with scripts. I got the menu above good. If I try that now, I always get an error message.
What am I doing wrong?
Attachments
Snipaste_2021-01-25_12-40-34.png
Snipaste_2021-01-25_12-40-34.png (10.59 KiB) Viewed 913 times

highend
Posts: 13327
Joined: 06 Feb 2011 00:33
Location: Win Server 2022 @100%

Re: second toolbar

Post by highend »

You need to put the list in quotes (either single or double). It's a string.
One of my scripts helped you out? Please donate via Paypal

7iben
Posts: 74
Joined: 04 Apr 2019 18:22

Re: second toolbar

Post by 7iben »

super thank you for your help.
It works :D

Post Reply