Page 1 of 1

halves the Xyplorer

Posted: 21 Jun 2023 14:41
by 7iben
Hello, I would like to have a button that halves the Xyplorer. If I have two panels open and then want to close one panel, I would press the button. One panel then closes and the XYPLORER halves to the size of the open panel + tree. Often I have to switch from two panels to one panel and then reduce the size of the XYPLORER to have enough space on the screen. When I press the button again, the XYPLORER should be twice as big again. This feature would be really helpful and would save time.

Re: halves the Xyplorer

Posted: 21 Jun 2023 15:05
by highend
First run must be with dual pane active!

Code: Select all

    $tmpIni = "%TEMP%\~XY.ini";
    savesettings 1, $tmpIni;
    $width      = getkey("WinW", "General", $tmpIni);
    $height     = getkey("WinH", "General", $tmpIni);
    $pane2Width = getkey("Pane2Width", "Layout", $tmpIni);

    if (get("#800")) {
        winsize $width - $pane2Width, $height;
    } else {
        winsize $width + $pane2Width, $height;
    }
    #800;

Re: halves the Xyplorer

Posted: 21 Jun 2023 15:27
by 7iben
wow, great, thank you so much. That's exactly what I mean. Is it also possible that the position of XYPLORER stops on the right instead of the left when minimizing? With this script it is reduced to the left. It would be great if I could also zoom out to the right.

Re: halves the Xyplorer

Posted: 21 Jun 2023 15:31
by highend
There is winpos (viewtopic.php?p=120827#p120827), move it appropriately...

Re: halves the Xyplorer

Posted: 21 Jun 2023 16:50
by 7iben
I don't understand. Unfortunately I can't write scripts. I just want XYPLORER to resize right to left instead of left to right. Do you have a suggestion how the script could look like?

Re: halves the Xyplorer

Posted: 21 Jun 2023 18:00
by highend

Code: Select all

    $tmpIni = "%TEMP%\~XY.ini";
    savesettings 1, $tmpIni;
    $xPos       = getkey("WinX", "General", $tmpIni);
    $yPos       = getkey("WinY", "General", $tmpIni);
    $width      = getkey("WinW", "General", $tmpIni);
    $height     = getkey("WinH", "General", $tmpIni);
    $pane2Width = getkey("Pane2Width", "Layout", $tmpIni);

    if (get("#800")) {
        winsize $width - $pane2Width, $height;
        winpos $xPos + $pane2Width, $yPos;
    } else {
        winsize $width + $pane2Width, $height;
        winpos $xPos - $pane2Width, $yPos;
    }
    #800;

Re: halves the Xyplorer

Posted: 21 Jun 2023 19:31
by 7iben
Perfect. Thanks very much.

Re: halves the Xyplorer

Posted: 24 May 2024 17:08
by 7iben
I use this feature hundreds of times every day. I couldn't imagine XYplorer without this function. Thank you again for the script. :tup: :tup: :tup: