UDC-Menu confusing to navigate - and a suggestion how to improve it

Features wanted...
Post Reply
MBaas
Posts: 684
Joined: 15 Feb 2016 21:08

UDC-Menu confusing to navigate - and a suggestion how to improve it

Post by MBaas »

I have written a few scripts and batches to do smart things, like opening today's journal-folder (journal is a folder-structure in which I have one folder per day if anything was journalled on that day).

Now, that script is called through User > "Load Script File" > "Goto Today's Journal".

Before I tapped into .xys, I used .btm (batch-files). So another useful tool in that set it "Create .lnk in todays' journal" as well as "Copy to" or "Move to". These are all items User " Open With".

That leads to a menu-structure which is suited to the way XY categorizes these actions. But when I have a script that copies something, it would immensely help usability when trying to use these macros, if I could call it through the "Copy To"-Menu!

Or am I perhaps just missing a hidden tweak that enables scripting in the "Location"-field of a CopyTo-Item?
:oops:
It did, as I just found out while trying to describe these thoughts. But doesn't work for "Copy To"-Items, where it tries to create a subfolder
"<curpath>\#nnnn". (I guess the same will happen with "Move To", so it's not a generic principle)

How do others deal with structuring their stuff, I can't be alone with this?

I thought about using the catalog - but it fill more than screen height already, so it won't be ideal anyway (having to click through categories first is also not ideal, just takes too long... :wink:)

So I'd like to discuss an idea of improving the user-menu:
"Manage User-Defined Commands" receives a new option "Use User-Defined Menu".

If that is checked, it completely replaces the following sub-menus with XY's Categorization of commands by a User-Defined Layout. There could certainly be an arbitrarily complex separate tool to manage the layout of that menu, but the easiest way (though not too user-friedly, but sufficient for a 1st step) would be to add a field to every command "Menu-Path", a simple string with the menu-structure that lead to that path (like: "Copy > VPN > Hamburg"). Maybe there could even be multiple paths to access an item, so alternatives could be separated using "|" or whatever: "Copy Y Today's Journal|Journal > Copy current item into journal"), And possibly some syntax to add icons to the individual submenus.
Every item would have one #ID only - the one that was assigned when the item was created in "Manage UDC".
____________________________________________________________________________________
Happy user. Screen scaling 100% and W11Pro [Version 10.0.26200.7922], XY 28.30.0600 * * LinkTree

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

Re: UDC-Menu confusing to navigate - and a suggestion how to improve it

Post by highend »

You did notice that the category names are similar to the names of some scripting commands?

Code: Select all

goto
open
openwith
moveto
copyto
backupto
etc.
so it makes no sense that copyto loads a script or an item of the "load script" category is put inside the "copy to" category in the submenu

How I work with UDCs?
I'm too lazy to navigate through that menu at all and because of this I've written a little starter script that lists all my existing scripts (with exclusions if they are in a specific subfolder or have a specific name (because they are only a template)) in a inputselect() dialog where the most recently <x> executed ones are always brought up to the top (for faster access).
That script is in the "load script" category and has a keyboard shortcut. So I press CTRL+/ and either click on one of the entries or use the keyboard for filtering (if I'm looking for something that is not in the <x> top (favorite) entries.
And all my scripts do what you would put directly into any of the other categories, only by scripting it. The UDC for these categories is only a simplified gui for common commands...
One of my scripts helped you out? Please donate via Paypal

MBaas
Posts: 684
Joined: 15 Feb 2016 21:08

Re: UDC-Menu confusing to navigate - and a suggestion how to improve it

Post by MBaas »

highend wrote: 16 Jan 2021 13:29 You did notice that the category names are similar to the names of some scripting commands?
Yes, I did.
highend wrote: 16 Jan 2021 13:29 so it makes no sense that copyto loads a script or an item of the "load script" category is put inside the "copy to" category in the submenu
The point I was trying to make is that there is a perspective in which a "technical view" as XY's predefined UDC-Structure suggests makes sense.
But when I have my "user's hat" on, I just want to copy a file into my journal folder - and I don't even want to have to remember if I implemented that functionality via script (User > Load Script) or if that functionality was simple enough to put into "Copy to".

Maybe one day I get to the point of having scripts for every function I need, but atm I'm living in a mixed scenario where sometimes "Copy To" is good enough, sometimes I need "Open with" to fire a batch that does the job (in terms of functionality executed it's "Copy To" or "Move To") and for other cases my humble scripting abilities were good enough for an entry in "Load Script"
I find that increasingly confusing (as the number of UDCs increases) and I still think my suggested approach would be a great improvement because it would give the user the ability to structure the men-layout according to his needs.
____________________________________________________________________________________
Happy user. Screen scaling 100% and W11Pro [Version 10.0.26200.7922], XY 28.30.0600 * * LinkTree

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

Re: UDC-Menu confusing to navigate - and a suggestion how to improve it

Post by highend »

Just as an example to show you how such a script starter (the basic version of it) could categorize all your existing scripts into submenus...

$uncategorized = "Uncategorized"; = Name of the category that will hold all scripts that don't belong to any of your defined categories
$categories = "Copy|Move|Open|Rename"; = Your defined categories in the order they should appear in the popupnested menu
If a script files base name contains one of these words it's put into the belonging category

So the goal would only be: Rename your script files so that they belong into one of your defined categories and not to "Uncategorized" any more...

If you don't want it, don't use it^^
Script launcher_v0.1.xys
1.gif
To see the attached files, you need to log into the forum.
One of my scripts helped you out? Please donate via Paypal

MBaas
Posts: 684
Joined: 15 Feb 2016 21:08

Re: UDC-Menu confusing to navigate - and a suggestion how to improve it

Post by MBaas »

Thanks - that's cool! Definitely will give it a try and will try to reorganize my stuff with it. I sense there will be new challenges ahead, but hey - who doesn't enjoy an adventure from time to time? :D
____________________________________________________________________________________
Happy user. Screen scaling 100% and W11Pro [Version 10.0.26200.7922], XY 28.30.0600 * * LinkTree

MBaas
Posts: 684
Joined: 15 Feb 2016 21:08

Re: UDC-Menu confusing to navigate - and a suggestion how to improve it

Post by MBaas »

Hey highend, I'm working on a nice update for it - hope to have it ready tomorrow.
Just a quick question meanwhile: #1; shows my "Go To" menu. Is there a way to get the "raw" text of that menu when building a new menu?

Thanks
Michael
____________________________________________________________________________________
Happy user. Screen scaling 100% and W11Pro [Version 10.0.26200.7922], XY 28.30.0600 * * LinkTree

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

Re: UDC-Menu confusing to navigate - and a suggestion how to improve it

Post by highend »

Sure, get() knows it...
One of my scripts helped you out? Please donate via Paypal

MBaas
Posts: 684
Joined: 15 Feb 2016 21:08

Re: UDC-Menu confusing to navigate - and a suggestion how to improve it

Post by MBaas »

Aaaah, super :D
Thanks!
____________________________________________________________________________________
Happy user. Screen scaling 100% and W11Pro [Version 10.0.26200.7922], XY 28.30.0600 * * LinkTree

MBaas
Posts: 684
Joined: 15 Feb 2016 21:08

Re: UDC-Menu confusing to navigate - and a suggestion how to improve it

Post by MBaas »

Duh, can't find it. Did you mean get("MenuCaption",#1); ? I used the wrong vocabulary - was looking for the definitions of the UDCs.

I'm trying to build a GoTo-Menu that combines scripts (that to your .xys) and the content of the UDC "GoTo". When I just use #1: in that menu, I get an one item which opens the GoTo-menu. But I'd like to show its menu-items instead :wink:
____________________________________________________________________________________
Happy user. Screen scaling 100% and W11Pro [Version 10.0.26200.7922], XY 28.30.0600 * * LinkTree

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

Re: UDC-Menu confusing to navigate - and a suggestion how to improve it

Post by highend »

Menu - Help - List All Commands...
What does that contain? All existing commands? Are UDC IDs inside this list?
And you can still not find the necessary argument for get()?

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

MBaas
Posts: 684
Joined: 15 Feb 2016 21:08

Re: UDC-Menu confusing to navigate - and a suggestion how to improve it

Post by MBaas »

Oooh, I see: you mean this:

Code: Select all

get("listofcommands",3);
Wow, don't know what say - my brain is just wired differently :wink:

Thanks!
____________________________________________________________________________________
Happy user. Screen scaling 100% and W11Pro [Version 10.0.26200.7922], XY 28.30.0600 * * LinkTree

MBaas
Posts: 684
Joined: 15 Feb 2016 21:08

Re: UDC-Menu confusing to navigate - and a suggestion how to improve it

Post by MBaas »

Ok, finally I really managed to tweak your script so that it gives me exactly the type of menu I was looking for initially :biggrin:

Let me start with a screenie a few comments:
17-01-_2021_15-41-23.png
  • it's keyboard-friendly (well,not always, but these are "details" :wink: )
  • the "Copy"-Menu now offers functionality related to copying and could combine appropriately named script, UDC and manual extensions of that menu.
The biggest change is that the script now supports an optional folder "<xyscripts>" . "\Script launcher Templates\" and in that folder one can place .txt-files with the same name as the categories used in the script. If such file is found, it is used. The file should contain string "-->menu" to indicate where the scripts should be added. Such a template may contain "##id;" entried to inject the contents of a UDC.

So, here is the content of "copy.txt" which was the base of the menu shown in the screenshot:

Code: Select all

&Copy
  file-&content|#117|%iconlib%\clip2.ico
  :copypath
  -
  &Duplicate it|#1415;
  into today's &journal-folder|#1412;
  .LNK in today's j&ournal-folder|#1405;
  -
##5;
-->menu
Getting that to work was quite an experience and I will post some comments about the difficulties I had in a different thread. Definitely your support was essential - I wouldn't have had the faintest idea how to tackle this in xys. THANKS VERY MUCH! :appl:

I'm sure there are many bugs left in it and definitely it is not written generically enough to work everywhere - but it worked for me and that was most important initially :wink:
Script launcher_v0.2.xys
The usual claim is "Whoever finds bugs may keep them" - but actually I'd be interested in any (friendly) comments you or anyone else may have :wink:

And of course: use entirely at your risk, NO WARRANTY etc.
To see the attached files, you need to log into the forum.
____________________________________________________________________________________
Happy user. Screen scaling 100% and W11Pro [Version 10.0.26200.7922], XY 28.30.0600 * * LinkTree

Post Reply