Expanding "CEA_ListRightClickOnWhite=XXX" Tweak

Features wanted...
klownboy
Posts: 4403
Joined: 28 Feb 2012 19:27
Location: Windows 11, 25H2 Build 26200.7171 at 100% 2560x1440

Expanding "CEA_ListRightClickOnWhite=XXX" Tweak

Post by klownboy »

Hey Don, we have a tweak for both "Tree" and "List" to modify XY's behavior on what actions are to be taken when we right click. I like being able to pop-up the Favorite Folders in the tree (and you can also set the subject List tweak to do Favorite Folders), but it would be nice to be able to pull-up "Favorite Files" with a List right click on white. It makes sense that we'd have "Favorite Folders" in the tree and "Favorite Files in the list but that tweak option doesn't exist.

An even better option for both tweaks (tree and list), would be a user definable action such as a script. Since it's so easy to right click on white space, this would make running a script of choice a nice idea.
Thanks,
Ken

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

Re: Expanding "CEA_ListRightClickOnWhite=XXX" Tweak

Post by admin »

Script is planned anyway for later.

Fav Files, yep, I can do that.

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

Re: Expanding "CEA_ListRightClickOnWhite=XXX" Tweak

Post by klownboy »

Thanks Don. Coding wise it can't be that far away since you can currently load a script as one of your Favorite Files.

I was curious, if I modified my "Favorite Files" to only one item which happened to be a script, if it would simply run the script instead of bringing up a "one item" menu. Unfortunately it does bring up a one item menu. That could be a decent way to run a script though simply by a right click in the List white space if in your code you sensed if / when there was only one item it would simply run or load it instead of bring up a one item menu. This would be similar to other menu items in scripting.

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

Re: Expanding "CEA_ListRightClickOnWhite=XXX" Tweak

Post by admin »

I added it. Enjoy the experiment. :)

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

Re: Expanding "CEA_ListRightClickOnWhite=XXX" Tweak

Post by klownboy »

Cool Don, I'll give it a try. I don't know why anyone would want a one item menu to come up anyway so I suppose it makes sense.

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

Re: Expanding "CEA_ListRightClickOnWhite=XXX" Tweak

Post by admin »

Well, I made it a little differently, but you can achieve what you want.

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

Re: Expanding "CEA_ListRightClickOnWhite=XXX" Tweak

Post by klownboy »

Hey Don, the new change and tweak works great. To load a script resource file I used the typical syntax:

Code: Select all

CEA_ListRightClickOnWhite_Script=::load "D:\Tools\XYplorer\Scripts\vTB.xys"
It loaded my Vertical Toolbar script here http://www.xyplorer.com/xyfc/viewtopic. ... 94#p119162 It seems to work fine whether you have a semi colon after the script resource file or not.

Edit : You are right as far as the beta notes; it works best for very quick access to a menu.

Thanks,
Ken

PeterH
Posts: 2826
Joined: 21 Nov 2005 20:39
Location: DE W11Pro 24H2, 1920*1200*100% 3840*2160*150%

Re: Expanding "CEA_ListRightClickOnWhite=XXX" Tweak

Post by PeterH »

Just a question: do you think that, if you define a script, you have to specify the "::" to say that the script is a script? :biggrin:

(I don't hope so. :roll: But: I didn't test it :whistle: )

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

Re: Expanding "CEA_ListRightClickOnWhite=XXX" Tweak

Post by klownboy »

Hi PeterH, Don is the one who mentioned "load" ing a script file in the beta notes and I suppose that's the way he coded it. And before I arrived at the above, I tried only the script file, only the script file quoted, load the script file, and load the script file quoted and ::load the script file unquoted and guess what, none of those worked until I placed the colons in front of load with the script quoted just if loaded from the AB. :) I wrote the follow-up only to pass on the syntax that worked.

PeterH
Posts: 2826
Joined: 21 Nov 2005 20:39
Location: DE W11Pro 24H2, 1920*1200*100% 3840*2160*150%

Re: Expanding "CEA_ListRightClickOnWhite=XXX" Tweak

Post by PeterH »

OK: the variable says it defines a script - so I think it's strange if "::" is needed to say that it is a script.
This way it doesn't look like a script, but like a goto argument.

Oh - just an idea: what if you add a semicolon as last character?
And Ah :-) the example in the change log is:
CEA_TreeRightClickOnWhite_Script=echo "Hi!";

Hm - in the end Don should explain. If it would be like a goto argument it wouldn't be bad at all, it just should be described as such.
(In the command line you can either specify double colon left, semicolon right, or both. "Smartness" :titter: )

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

Re: Expanding "CEA_ListRightClickOnWhite=XXX" Tweak

Post by klownboy »

Hi again PeterH, it doesn't seem to matter whether you have the semicolon at the end or not at least with load script - both worked - but then again that's also true in the Address Bar. I mentioned that in the post previous to my last one.

binocular222
Posts: 1419
Joined: 04 Nov 2008 05:35
Location: Win11, Win10, 100% Scaling

Re: Expanding "CEA_ListRightClickOnWhite=XXX" Tweak

Post by binocular222 »

I think CEA should have only 1 option: trigger script
Popup fav file/folder/tabs... are redundant because only advanced/decent user can touch the tweak, by that time he already capable of writing a simple script, which is more than enough to popup whatever he wants.

P.S XY is becoming a bit fatty. XYplorer.exe is now 6.32 MB compared to about 3.4 MB in ver 8x
I'm a casual coder using AHK language. All of my xys scripts:
http://www.xyplorer.com/xyfc/viewtopic. ... 243#p82488

bdeshi
Posts: 4256
Joined: 12 Mar 2014 17:27
Location: Asteroid B-612
Contact:

Re: Expanding "CEA_ListRightClickOnWhite=XXX" Tweak

Post by bdeshi »

Goodie! CEA is becoming a reality! :appl:
Icon Names | Onyx | Undocumented Commands | xypcre
[ this user is asleep ]

PeterH
Posts: 2826
Joined: 21 Nov 2005 20:39
Location: DE W11Pro 24H2, 1920*1200*100% 3840*2160*150%

Re: Expanding "CEA_ListRightClickOnWhite=XXX" Tweak

Post by PeterH »

At least, if CEA_TreeRightClickOnWhite_Script=echo "Hi!"; is an example in documentation, it should work this way.

And: it seems natural to me to work without :: :D
So maybe: :bug:

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

Re: Expanding "CEA_ListRightClickOnWhite=XXX" Tweak

Post by admin »

It's like scripts in the address bar: You need either :: or ; or both to recognize a script.

But I agree that in this case it is clear that is has to be a script, so I will make it work even without :: and ;.

Post Reply