Page 1 of 1

3 ideas for a better & more useful catalog

Posted: 30 Apr 2022 15:02
by autocart
Just as some brainstorming ideas:

1) I would wish for more scripting support for the catalog, especially creating and editing catalog items, getting the currently focused item, focusing a specific item, and getting also the caption(!) of itematpos and then of the focused item.

In theory, inserting and editing an item in the catalog could be done now with the undocumented sendkeys command: viewtopic.php?p=119994#p119994 sending XY keyboard shortcuts "{Insert}" or "%{Enter}" while the catalog has focus (compare get("FocusedControl"); and focus;) and then editing the values in the dialog that pops up with an AutoHotkey script that returns focus back to XY once it is done. However, this of course is quite an ugly work-around and certainly not 100 % reliable. Besides, as far as which item has focus at the moment, is hard to figure out. It is more easy to read the item under the mouse with indexatpos(); or also itematpos(); (however, the latter returns the location/description/script and not the caption) and comparing it to the results of catalogreport("{Caption}<crlf>{Location}<crlf>{Index}", "{Caption}<crlf>{Location}<crlf>{Index}");. The currently "focused" category seemingly can be found by catalogreport("{Caption}<crlf>{Index}",,1");, however, the currently focused catalog item, as far as I can see, can only be identified by sendkeys "%{Enter}"; and then trying to analyze that dialog with AutoHotkey somehow.


2) It would also be nice to have an option to trigger a catalog item (especially a catalog script) with the MMB and being able to differentiate in the script which button triggered it.

There is a currently working work-around with tht CEA "Clicking on Items: Middle-click on folder" right now, but maybe there is a prettier solution? (And Don, just in case this should be an unintended side effect - please, don't take it away without providing a better solution at the same time. Thx.)


3) Last but not least, it would be nice to have a dynamic multi-item for the catalog that will always (= at any time) show all currently defined favorite files or folders underneath each other.

Regards

Re: 3 ideas for a better & more useful catalog

Posted: 01 May 2022 19:52
by eil
> 2)
read help file on command get with parameter Trigger.

Re: 3 ideas for a better & more useful catalog

Posted: 01 May 2022 21:44
by autocart
Thank you, eil,
I would be happy if I was wrong but the help says (and XY behaves in that way):
Help wrote:- "Trigger", [mode="mousebtn"]
mousebtn: Returns the mouse button that triggered a script of a Custom Toolbar Button. Returned values:
0 = None = 0
1 = LeftClick = 1
2 = RightClick = 2
4 = MiddleClick = 4 (planned)
16 = Drop (OR-ed with the button values if triggered by drag-and-drop)
[...]
Notes on mousebtn and ctbindex:
- The <get trigger> variable is cleared after the script is processed.
- Currently implemented only for Custom Toolbar Buttons.
Still, I am happy that you thought about it and replied. Thank you.

Re: 3 ideas for a better & more useful catalog

Posted: 02 May 2022 14:59
by eil
Missed that line about only some places use for this command, kinda used to XY having all-over support. Probably that should be a wish, for trigger to work anywhere.

Re: 3 ideas for a better & more useful catalog

Posted: 13 May 2022 01:23
by autocart
Hey, I just found this in help:
You can easily add toolbar buttons with their icons, captions, and functionality to the Catalog. Simply add the button key prefixed by ":" to the Location field of the Catalog item. Everything else can be left empty and at the default values.
...
With the exception of the pressed state effect these Catalog Buttons have all the properties of the real toolbar buttons including left- and right-click menus.
...
Sounds quite interesting.

Re: 3 ideas for a better & more useful catalog

Posted: 13 May 2022 02:42
by XY fan
And I still think it would be useful to have an option for the Catalog to be a second Toolbar just under the main (existing) toolbar

Re: 3 ideas for a better & more useful catalog

Posted: 13 May 2022 16:58
by Norn
autocart wrote: 13 May 2022 01:23 Hey, I just found this in help:
You can easily add toolbar buttons with their icons, captions, and functionality to the Catalog. Simply add the button key prefixed by ":" to the Location field of the Catalog item. Everything else can be left empty and at the default values.
...
With the exception of the pressed state effect these Catalog Buttons have all the properties of the real toolbar buttons including left- and right-click menus.
...
Sounds quite interesting.
It seems that user buttons are not supported?
A trivial idea: show something for the catalog via a user button: e.g. :#User Button #14

Re: 3 ideas for a better & more useful catalog

Posted: 13 May 2022 17:49
by autocart
try :ctb14

Re: 3 ideas for a better & more useful catalog

Posted: 13 May 2022 18:19
by Norn
autocart wrote: 13 May 2022 17:49try :ctb14
:tup:

Re: 3 ideas for a better & more useful catalog

Posted: 13 May 2022 20:06
by eil
autocart wrote: 13 May 2022 01:23 Hey, I just found this in help:
You can easily add toolbar buttons with their icons, captions, and functionality to the Catalog. Simply add the button key prefixed by ":" to the Location field of the Catalog item. Everything else can be left empty and at the default values.
...
With the exception of the pressed state effect these Catalog Buttons have all the properties of the real toolbar buttons including left- and right-click menus.
...
Sounds quite interesting.
It's kinda strange that catalog doesn't support smth natively, but supports "launching" smth that does support it. :lol: I didn't know about that trick too.