Page 1 of 1

"text" Command in popupmenu

Posted: 08 Aug 2025 15:48
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 2269 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 2269 times
Menuitem is:
    &loadtimes;:text "<get loadtimes>";:findlabeldark


Probably I am doing something - but I am not seeing it...

Re: "text" Command in popupmenu

Posted: 08 Aug 2025 19:59
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
        }
    }

Re: "text" Command in popupmenu

Posted: 08 Aug 2025 21:00
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: