"text" Command in popupmenu

Please check the FAQ (https://www.xyplorer.com/faq.php) before posting a question...
Post Reply
MBaas
Posts: 654
Joined: 15 Feb 2016 21:08

"text" Command in popupmenu

Post by MBaas »

In a recent discussion I was reminded of "
text <get loadtimes>;
" which I found very useful - so I wanted to integrate into my personal menu.
But I get different results!

...when typing text <get loadtimes>; into the address bar:
08-08-2025_15-43-22.png
08-08-2025_15-43-22.png (50.66 KiB) Viewed 2265 times
[/img]

...and when using a menuitem in a popupnested:
08-08-2025_15-45-57.png
08-08-2025_15-45-57.png (20.69 KiB) Viewed 2265 times
Menuitem is:
    &loadtimes;:text "<get loadtimes>";:findlabeldark


Probably I am doing something - but I am not seeing it...
_________________________________________________
Happy user with Screen scaling 100% and W11Pro 24H2 ;-)

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

Re: "text" Command in popupmenu

Post by highend »

Code: Select all

    $menu = <<<>>>
&loadtimes;::text get("loadtimes");:findlabeldark
    >>>;
    $sel = popupnested($menu, 6:=<crlf>);
    if ($sel) {
        if (substr($sel, 0, 2) == "::") {
            load $sel, , "s";
        } else {
            // Do something else
        }
    }
One of my scripts helped you out? Please donate via Paypal

MBaas
Posts: 654
Joined: 15 Feb 2016 21:08

Re: "text" Command in popupmenu

Post by MBaas »

ah, I had not thought of translating <get into a simple get-call - now it does what it's supposed to do. Thanks! :appl:
_________________________________________________
Happy user with Screen scaling 100% and W11Pro 24H2 ;-)

Post Reply