Page 1 of 3

Expanding "CEA_ListRightClickOnWhite=XXX" Tweak

Posted: 05 Mar 2015 18:56
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

Re: Expanding "CEA_ListRightClickOnWhite=XXX" Tweak

Posted: 07 Mar 2015 16:20
by admin
Script is planned anyway for later.

Fav Files, yep, I can do that.

Re: Expanding "CEA_ListRightClickOnWhite=XXX" Tweak

Posted: 07 Mar 2015 16:48
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.

Re: Expanding "CEA_ListRightClickOnWhite=XXX" Tweak

Posted: 07 Mar 2015 17:12
by admin
I added it. Enjoy the experiment. :)

Re: Expanding "CEA_ListRightClickOnWhite=XXX" Tweak

Posted: 07 Mar 2015 17:17
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.

Re: Expanding "CEA_ListRightClickOnWhite=XXX" Tweak

Posted: 07 Mar 2015 17:19
by admin
Well, I made it a little differently, but you can achieve what you want.

Re: Expanding "CEA_ListRightClickOnWhite=XXX" Tweak

Posted: 07 Mar 2015 22:04
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

Re: Expanding "CEA_ListRightClickOnWhite=XXX" Tweak

Posted: 07 Mar 2015 23:07
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: )

Re: Expanding "CEA_ListRightClickOnWhite=XXX" Tweak

Posted: 07 Mar 2015 23:34
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.

Re: Expanding "CEA_ListRightClickOnWhite=XXX" Tweak

Posted: 08 Mar 2015 00:53
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: )

Re: Expanding "CEA_ListRightClickOnWhite=XXX" Tweak

Posted: 08 Mar 2015 01:36
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.

Re: Expanding "CEA_ListRightClickOnWhite=XXX" Tweak

Posted: 08 Mar 2015 02:09
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

Re: Expanding "CEA_ListRightClickOnWhite=XXX" Tweak

Posted: 08 Mar 2015 06:31
by bdeshi
Goodie! CEA is becoming a reality! :appl:

Re: Expanding "CEA_ListRightClickOnWhite=XXX" Tweak

Posted: 08 Mar 2015 12:17
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:

Re: Expanding "CEA_ListRightClickOnWhite=XXX" Tweak

Posted: 08 Mar 2015 12:55
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 ;.