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: 245
Joined: 18 Mar 2012 21:50

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

Post by cadu » 22 Feb 2019 12:31

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: 8351
Joined: 06 Feb 2011 00:33

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

Post by highend » 22 Feb 2019 12:52

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 or highend (at) web (dot) de

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

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

Post by cadu » 22 Feb 2019 13:20

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: 8351
Joined: 06 Feb 2011 00:33

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

Post by highend » 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"; }
One of my scripts helped you out? Please donate via Paypal or highend (at) web (dot) de

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

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

Post by cadu » 22 Feb 2019 14:10

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: 8351
Joined: 06 Feb 2011 00:33

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

Post by highend » 22 Feb 2019 14:13

Set Home>Lock Home|#347;#349|:home
One of my scripts helped you out? Please donate via Paypal or highend (at) web (dot) de

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

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

Post by cadu » 22 Feb 2019 14:20

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: 8351
Joined: 06 Feb 2011 00:33

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

Post by highend » 22 Feb 2019 14:30

One of my scripts helped you out? Please donate via Paypal or highend (at) web (dot) de

Post Reply