How to set a command sequence (e.g.#347;#349) in custom menu?

Please check the FAQ (https://www.xyplorer.com/faq.php) before posting a question...
Post Reply
cadu
Posts: 287
Joined: 18 Mar 2012 21:50

How to set a command sequence (e.g.#347;#349) in custom menu?

Post by cadu »

Hi,

I'd appreciate your help.

In the user button, I could set a sequence of commands with success:
"Set Home>Lock Home";#347;#349
However, that syntax doesn't work for a custom menu:
$menus = <<<>>>
Set Home>Lock Home;#347;#349
>>>;
popupmenu($menus, , , , , , <crlf>);
How to set a command sequence (e.g.#347;#349) in a custom menu?

Thank you very much!

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

Re: How to set a command sequence (e.g.#347;#349) in custom menu?

Post by highend »

Then use a better menu item part separator and read the docs for popupmenu()
and load...
One of my scripts helped you out? Please donate via Paypal

cadu
Posts: 287
Joined: 18 Mar 2012 21:50

Re: How to set a command sequence (e.g.#347;#349) in custom menu?

Post by cadu »

highend wrote: 22 Feb 2019 12:52 Then use a better menu item part separator and read the docs for popupmenu()
and load...
Hi highend.
Could you give me the direct answer for a donation?
Thank you!

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

Re: How to set a command sequence (e.g.#347;#349) in custom menu?

Post by highend »

Something like this should work...

Code: Select all

    $menus = <<<>>>
Set Home>Lock Home|#347;#349
    >>>;
    $sel = popupmenu($menus, 6:=<crlf>, 7:="|");
    if ($sel) { load "$sel", , "s"; }
One of my scripts helped you out? Please donate via Paypal

cadu
Posts: 287
Joined: 18 Mar 2012 21:50

Re: How to set a command sequence (e.g.#347;#349) in custom menu?

Post by cadu »

highend wrote: 22 Feb 2019 13:34 Something like this should work...

Code: Select all

    $menus = <<<>>>
Set Home>Lock Home|#347;#349
    >>>;
    $sel = popupmenu($menus, 6:=<crlf>, 7:="|");
    if ($sel) { load "$sel", , "s"; }
Thank you very much @highend!
Further question:

Is it possible to append an XYplorer icon to the command sequence (e.g. :home)
Set Home>Lock Home|#347;#349:home
I added :home just as an example, because the command doesn't work with this syntax.

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

Re: How to set a command sequence (e.g.#347;#349) in custom menu?

Post by highend »

Set Home>Lock Home|#347;#349|:home
One of my scripts helped you out? Please donate via Paypal

cadu
Posts: 287
Joined: 18 Mar 2012 21:50

Re: How to set a command sequence (e.g.#347;#349) in custom menu?

Post by cadu »

highend wrote: 22 Feb 2019 14:13 Set Home>Lock Home|#347;#349|:home
Donation performed already. Thank you!

A further point:
Is it possible to transpose this syntax to work in Breadcrumb menu?
Set Home>Lock Home|#347;#349|:home

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

Re: How to set a command sequence (e.g.#347;#349) in custom menu?

Post by highend »

One of my scripts helped you out? Please donate via Paypal

Post Reply