Add sub-menu support for scripts

Features wanted...
highend
Posts: 14656
Joined: 06 Feb 2011 00:33
Location: Win Server 2022 @100%

Re: Add sub-menu support for scripts

Post by highend »

That would be a great start but all kinds of icons would be even better (but I'm afraid that's not possible?)
E.g: From executables, .dll's (with /index) like a multi-script is capable of
One of my scripts helped you out? Please donate via Paypal

admin
Site Admin
Posts: 65327
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Re: Add sub-menu support for scripts

Post by admin »

Here is the current state of affairs. Pretty cool IMO. 8)

item argument has now up to 4 sections: caption;data;icon;state

icon: e.g. ":paper" for the paper folder toolbar icon

state 1 = default (bold)
state 2 = checked
state 4 = disabled


EXAMPLE:

Script:

Code: Select all

$menu = <<<MENU
A1
 B1;;:paper
 B2
  Ca1
 B3
  Cb1;;:paper;2
  Cb2;;;4
  -
  Cb3;Cb3Data;;3
 -
 B4
A2;;:minitree
-
A3
MENU;

  text popupnested($menu);
Resulting Menu:
Attachments
2016-10-28_133149.png
2016-10-28_133149.png (4.89 KiB) Viewed 2404 times

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

Re: Add sub-menu support for scripts

Post by highend »

Actually, yeah, that looks really cool! :appl:

"icon" can only use toolbar icons then?
One of my scripts helped you out? Please donate via Paypal

admin
Site Admin
Posts: 65327
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Re: Add sub-menu support for scripts

Post by admin »

OK, full icon support just added. :biggrin:

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

Re: Add sub-menu support for scripts

Post by highend »

*dances*

Cool stuff & a great addition to XY's scripting capabilities!!
One of my scripts helped you out? Please donate via Paypal

klownboy
Posts: 4421
Joined: 28 Feb 2012 19:27
Location: Windows 11, 25H2 Build 26200.7462 at 100% 2560x1440

Re: Add sub-menu support for scripts

Post by klownboy »

I'm not speaking for highend, but ideally it would be best to be able to use either an internal XYplorer icon or a icon specified by full path/name or <xyicons>.
I'm late as usual... :biggrin:

admin
Site Admin
Posts: 65327
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Re: Add sub-menu support for scripts

Post by admin »

All coming, and more. :cup:

Marco
Posts: 2354
Joined: 27 Jun 2011 15:20

Re: Add sub-menu support for scripts

Post by Marco »

Any chance I can "chain" several popupmainmenu() so to create one button that can substitute the menubar?
Tag Backup - SimpleUpdater - XYplorer Messenger - The Unofficial XYplorer Archive - Everything in XYplorer
Don sees all [cit. from viewtopic.php?p=124094#p124094]

admin
Site Admin
Posts: 65327
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Re: Add sub-menu support for scripts

Post by admin »

Hm, I don't think so.

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

Re: Add sub-menu support for scripts

Post by highend »

Implemented in UMC :mrgreen:

And no, this is not the native XY context menu :biggrin:
UMC.gif
UMC.gif (193 KiB) Viewed 2379 times
One of my scripts helped you out? Please donate via Paypal

zhaowu
Posts: 30
Joined: 24 Oct 2016 16:03

Re: Add sub-menu support for scripts

Post by zhaowu »

Will this
popupnested
functionality apply to multi-line script popup menu in the future? :tup:

Explanation:

Syntax rules for XYplorer Script Files
(3) You can have more than one script inside a script file. In that case, loading the script file will pop up a menu presenting all scripts inside the script file by their captions.

"Caption|Icon|State : Label" Script
Suppose a new field SubMenuLevel is added like this
"Caption|Icon|State|SubMenuLevel : Label" Script
. Loading the script file can pop up a nested menu.
Last edited by zhaowu on 29 Oct 2016 02:08, edited 1 time in total.

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

Re: Add sub-menu support for scripts

Post by highend »

Somehow I don't understand the question...
One of my scripts helped you out? Please donate via Paypal

Filehero
Posts: 2721
Joined: 27 Feb 2012 18:50
Location: Windows 11@100%

Re: Add sub-menu support for scripts

Post by Filehero »

Cool!



No, great! :D :D :beer: :appl:

admin
Site Admin
Posts: 65327
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Re: Add sub-menu support for scripts

Post by admin »

zhaowu wrote:Will this
popupnested
functionality apply to multi-line script popup menu in the future? :tup:
It's not immediately planned, but passing SubMenuLevel is a good idea. :tup: So, maybe later...

LittleBiG
Posts: 1848
Joined: 08 Apr 2011 12:57
Location: Win10x64

Re: Add sub-menu support for scripts

Post by LittleBiG »

admin wrote:
zhaowu wrote:Will this
popupnested
functionality apply to multi-line script popup menu in the future? :tup:
It's not immediately planned, but passing SubMenuLevel is a good idea. :tup: So, maybe later...
Do I understand well? Would it give the possibility like changing a checked menu item to unchecked and vica versa, (seemingly) without leaving the menu? Or am I completely wrong here?

Post Reply