Add sub-menu support for scripts
Add sub-menu support for scripts
Add the ability to create sub-menus in scripts.
Re: Add sub-menu support for scripts
you could use popupmenu()
Icon Names | Onyx | Undocumented Commands | xypcre
[ this user is asleep ]
[ this user is asleep ]
-
- Posts: 855
- Joined: 05 Oct 2011 13:15
Re: Add sub-menu support for scripts
Hi’
And if you have more complex needs for dynamic menus or submenus, load $YourMenu, , "s" and heredoc syntax also come in handy, e.g.:
Have a nice day,
Flux
And if you have more complex needs for dynamic menus or submenus, load $YourMenu, , "s" and heredoc syntax also come in handy, e.g.:
Code: Select all
"Regular Entry"
msg 0;
"Submenu Entry<tab>>"
// ------------------>
$Menu = <<<#>>>
"Submenu First Entry"
msg 1;
"Submenu Second Entry"
msg 2;
#>>>;
load $Menu, , "s";
// ------------------<
Flux
• Scripts: Session Manager | SlideShow | Collection Manager | Power Launcher | Akelpad syntax highlighting | ...
Re: Add sub-menu support for scripts
+99!
Thanks @SammaySarkar & FluxTorpedoe!
But... A native way for real menu structures would be greatly preferred...
- If you switch to a submenu, the whole main menu is gone (hard to grasp what else you could have clicked, even more so for larger menus)
- While it's possible to get the main menu back you can't do it without adding another "..\" entry for each submenu (or however you'd name it)
Thanks @SammaySarkar & FluxTorpedoe!
But... A native way for real menu structures would be greatly preferred...
- If you switch to a submenu, the whole main menu is gone (hard to grasp what else you could have clicked, even more so for larger menus)
- While it's possible to get the main menu back you can't do it without adding another "..\" entry for each submenu (or however you'd name it)
One of my scripts helped you out? Please donate via Paypal
-
- Site Admin
- Posts: 60567
- Joined: 22 May 2004 16:48
- Location: Win8.1 @100%, Win10 @100%
- Contact:
Re: Add sub-menu support for scripts
Got an idea for how to do this. Planned for 17.20...
FAQ | XY News RSS | XY Twitter
Re: Add sub-menu support for scripts
@Flux
Can you create multiple nested submenus with your method?
Like:
Can you create multiple nested submenus with your method?
Like:
Root menu entry 1
Sub menu 1
....Entry a
....Entry b
....Sub menu 2
........Entry c
Root menu entry 2
One of my scripts helped you out? Please donate via Paypal
-
- Posts: 855
- Joined: 05 Oct 2011 13:15
Re: Add sub-menu support for scripts
Wicked…highend wrote:Can you create multiple nested submenus with your method?
Never needed it before, but here it is, an example with sub-sub-menu and embedded warnings:
— Variables must be quoted when used (else they are resolved prematurely)
— Even XY vars, especially <crlf> (which breaks heredoc menus)
Code: Select all
"Main Menu A1"
msg "Main Menu A1";
// --------------------------->
"Main Menu A2<tab>>"
$var = "foo;bar";
$Menu = <<<#>>>
"Submenu B1"
msg "Submenu B1";
// ------------------>
"Submenu B2<tab>>"
$SubMenu = <<<#)))
"SubSubmenu C1 [Regular]"
msg "C1";
"SubSubmenu C2 [Vars not quoted => risk of error]"
msg $var;
"SubSubmenu C3 [All vars quoted => OK]"
msg "$var";
"SubSubmenu C4 [Even CRLF => use chr(13)]"
msg "First line".chr(13)."Second Line";
#)));
load $SubMenu, , "s";
// ------------------<
#>>>;
load $Menu, , "s";
// ---------------------------<
———————————————————————————
Cool news!admin wrote:Got an idea for how to do this. Planned for 17.20...
Have a nice day,
Flux
• Scripts: Session Manager | SlideShow | Collection Manager | Power Launcher | Akelpad syntax highlighting | ...
Re: Add sub-menu support for scripts
Cool Flux and thanks a lot for providing the example! Now the only thing I have to do is build a clever parser
DoneNow the only thing I have to do is build a clever parser
One of my scripts helped you out? Please donate via Paypal
Re: Add sub-menu support for scripts
Works nicely (these are generated by UMC...)
Clicking on files / folders lead to a different menu...
Clicking on files / folders lead to a different menu...
One of my scripts helped you out? Please donate via Paypal
Re: Add sub-menu support for scripts
Hey highend, how's it going? I see you must be still tweaking UMC. I'm still using it daily. When are we, or maybe for now I should say I, going to see another update.
It would be nice though if Don could give us fly-out sub-menus on mouse hovering where the original menus stayed visible.
It would be nice though if Don could give us fly-out sub-menus on mouse hovering where the original menus stayed visible.
Windows 11, 23H2 Build 22631.3447 at 100% 2560x1440
Re: Add sub-menu support for scripts
Hi Ken. Everything's fine here. Didn't had much time for UMC in the past. But I've added a few features recently (one of them is obviously nested submenus) and menus got a "match" property as well so that rebuilding XY's tree and list menus became possible. Unfortunately not all menu entries have an internal XY ID so I need to add scripts to recreate the same functionality
One of my scripts helped you out? Please donate via Paypal
-
- Site Admin
- Posts: 60567
- Joined: 22 May 2004 16:48
- Location: Win8.1 @100%, Win10 @100%
- Contact:
Re: Add sub-menu support for scripts
Next beta supports multiple nested submenus with SC popupmenu()...admin wrote:Got an idea for how to do this. Planned for 17.20...
FAQ | XY News RSS | XY Twitter
Re: Add sub-menu support for scripts
While you're (already) on it, can you add icon support for popupmenu() as well? Too many people like those shiny little (distracting) thingies...
One of my scripts helped you out? Please donate via Paypal