Add sub-menu support for scripts

Features wanted...
FluxTorpedoe
Posts: 904
Joined: 05 Oct 2011 13:15

Re: Add sub-menu support for scripts

Post by FluxTorpedoe »

Hi’
A quick update to say thanks for the triple-pipe and include¹ nesting.
It definitely gives SC menus that extra polish!

And I discovered they have a great side-effect: since the whole menu structure is preprocessed, most variables can now be used as-is (hence pre-resolved) in submenus, no need to pass them via global or perms (so less code!)!

So, :appl:

Have a nice day, 8)
Flux


¹: Hmmm of course, just for :twisted: sake, I had to flirt with the infinite and try compacting several menu parts with an include self()
Well, I’ll communicate the results when my computer gets out of its loop… :mrgreen:
(just kidding, XY’s SC engine saw me coming and prevented it!)

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

Re: Add sub-menu support for scripts

Post by Filehero »

Code: Select all

v18.00.0018 - 2017-06-30 09:04
    + SC popupmenu/popupnested enhanced: Experimentally now you can add scripts 
      to your scripted menu,
Nice improvement.


Based on the previous popupnested() implementation I've made a generic menu (entry) launcher (now XY-wide all my menus/menu entries are completely described in one ini file :D ) that uses a entry descriptor like

Code: Select all

xy_elevated = XY restart elevated (s);;<xy>|exit("s");
The (script) code after the "|" simply gets mapped against the caption still allowing to define individual icons.

Post Reply