Just so you know, it does work already without the ";" at the end.admin wrote:...so I will make it work even without :: and ;.
Expanding "CEA_ListRightClickOnWhite=XXX" Tweak
-
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
-
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
-
admin
- Site Admin
- Posts: 65154
- Joined: 22 May 2004 16:48
- Location: Win8.1, Win10, Win11, all @100%
- Contact:
Re: Expanding "CEA_ListRightClickOnWhite=XXX" Tweak
But not without both, :: and ;.klownboy wrote:Just so you know, it does work already without the ";" at the end.admin wrote:...so I will make it work even without :: and ;.
FAQ | XY News RSS | XY X
-
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
As, in general, a script line has to be ended with semicolon, this sounds quite OK, I think.admin wrote:But not without both, :: and ;.
-
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
I'm not sure if you were asking a question, but this works: I know you always should end a script line with ";" but this works with or without the ending semicolon for whatever reason in XY's ini file and in the AB.
Code: Select all
CEA_ListRightClickOnWhite_Script=::load "D:\Tools\XYplorer\Scripts\vTB.xys"; -
admin
- Site Admin
- Posts: 65154
- Joined: 22 May 2004 16:48
- Location: Win8.1, Win10, Win11, all @100%
- Contact:
Re: Expanding "CEA_ListRightClickOnWhite=XXX" Tweak
Next version this will work as well:
Code: Select all
CEA_ListRightClickOnWhite_Script=load "D:\Tools\XYplorer\Scripts\vTB.xys"FAQ | XY News RSS | XY X
-
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
Thanks Don, 14.80.0243 works as stated no "::" up front and no ";" at the end.
Re: Expanding "CEA_ListRightClickOnWhite=XXX" Tweak
Don, can we see the existing tweak options more easily accessible via scripting via some new Misc. commands?
Miscellaneous | List | Edit Menu
Miscellaneous | List | Folder Shell Menu
Miscellaneous | List | Folder Shell Menu (Reserved/Extension-Only Version)
Miscellaneous | Various | Drives+Special
Not sure the second-level categories make sense (Various & List), so feel free to change them as you like.
Miscellaneous | List | Edit Menu
Miscellaneous | List | Folder Shell Menu
Miscellaneous | List | Folder Shell Menu (Reserved/Extension-Only Version)
Miscellaneous | Various | Drives+Special
Not sure the second-level categories make sense (Various & List), so feel free to change them as you like.
-
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
Hi TheQwerty, are you thinking of the possibility for on-the-fly changing of these values via scripting or simply the ease of changing them with scripting? It would be quite a cool feature if the referenced script in "CEA_ListRightClickOnWhite" could be changed immediately via a script, take affect immediately without the need for saves though if you wanted to save it you'd have to save it. Scripts could refer to different scripts for these values depending on the situation or need.
Re: Expanding "CEA_ListRightClickOnWhite=XXX" Tweak
These aren't values. These are commands to pull up the existing menus which have no alternatives today.klownboy wrote:Hi TheQwerty, are you thinking of the possibility for on-the-fly changing of these values via scripting or simply the ease of changing them with scripting?
You're making it much more complicated than it needs to be. There's no need to change the value of CEA_*_Script on the fly. Set them each to a script file and that script file is responsible for determining what to do and doing it.klownboy wrote:It would be quite a cool feature if the referenced script in "CEA_ListRightClickOnWhite" could be changed immediately via a script without the need for saves. Multiple scripts could be used depending on the situation or need.
For instance make CEA_TreeRightClickOnWhite_Script load the following script and now you have the ability to use any of the existing tweaks or modify the script further to have different smarts.Replicating the List pane tweaks is more difficult because 3 of the 5 options do not map directly to commands. Hence the request for making them available as Miscellaneous commands.
Code: Select all
/*#############################################################################\
TreeRightClickOnWhite.xys
Script versions of the various tweaks available for CEA_TreeRightClickOnWhite as
of March 9, 2015.
Suggested INI tweaks:
CEA_TreeRightClickOnWhite=6
CEA_TreeRightClickOnWhite_Script=::Load 'CEA\TreeRightClickOnWhite';
This makes all of the original tweaks available and allows you to change the
behavior without restarting XY.
[ABOUT]
Author = TheQwerty
Version = 1.0
Date = 2015-03-09 13:13z
Requires = XYplorer v14.80.0245
[]
\#############################################################################*/
/*******************************************************************************
** Show Menu
** Single entry point into script to easily modify the displayed menu.
*******************************************************************************/
"Show Menu||1 : showMenu"
$menu = <<<MENU
_favs
_favFiles
_favsFull
-
_drives
_drivesSpecial
-
_tabsAll
_tabsPane
MENU;
$menu = RegexReplace($menu, '(\r?\n)+', ';');
Load '*', $menu;
"0 <get MenuCaption 550>|:favs|1 : _favs"
#550; // Favorites | Favorite Folders | - submenu -
"1 Favorites Main Menu : _favsFull"
popupmainmenu 'favorites';
"2 <get MenuCaption 526>|:drives : _drives"
#526; // Go | Drives...
"3 <get MenuCaption 526> + <get MenuCaption 551> : _drivesSpecial"
// Build drive list
$drives = '';
foreach ($drive, Get('Drives')) {
$drives = <<<DRIVE
$drives
"$drive - <get DriveName $drive 1>|$drive" goto '$drive';
DRIVE;
}
$script = <<<SCRIPT
"%computer%|%computer%" goto '%computer%';
-
%desktop%
%personal%
%username%
-
$drives
-
"%net%|%net%" goto '%net%';
"%recycler%|%recycler%" goto '%recycler%';
SCRIPT
Load $script,, 's';
"4 <get MenuCaption 690>|:tablist : _tabsAll"
#690; // Panes | Tabs | - submenu -
"5 <get MenuCaption 564>|:favfiles : _favFiles"
#564; // Favorites | Favorite Files | - submenu -
"# <get MenuCaption 538>|:tablist : _tabsPane"
#538; // Go | Tablist...-
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
Yeah I know bad terminology, but I'm using value term generically, these values equate to commands.TheQwerty wrote:These aren't values. These are commands
That's a great idea/script, but not what I was talking about. I'm talking about changing the script resource file itself when the assigned value of CEA_ListRightClickOnWhite=6 or CEA_TreeRightClickOnWhite=6 so the script itself is changed in CEA_ListRightClickOnWhite_Script=load "D:\Tools\XYplorer\Scripts\vTB.xys". In other words, I think it would be an even better idea when the tweak value is "6", be able to change the assigned script resource file on the fly. In your case you're using the script resource file to access the other commands which is great but not what I was suggesting (though I'm sure it wasn't clear).
Thanks
Re: Expanding "CEA_ListRightClickOnWhite=XXX" Tweak
Why do you insist on making it so complicated?klownboy wrote:That's a great idea/script, but not what I was talking about. I'm talking about changing the script resource file itself when the assigned value of CEA_ListRightClickOnWhite=6 or CEA_TreeRightClickOnWhite=6 so the script itself is changed in CEA_ListRightClickOnWhite_Script=load "D:\Tools\XYplorer\Scripts\vTB.xys". In other words, I think it would be an even better idea when the tweak value is "6", be able to change the assigned script resource file on the fly. In your case you're using the script resource file to access the other commands which is great but not what I was suggesting (though I'm sure it wasn't clear).
What is gained by being able to change the values of CEA_TreeRightClickOnWhite_Script and CEA_ListRightClickOnWhite_Script on the fly vs having those set to a single script which determines which script to call?
-
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
Hi TheQwerty, I see your point and don't get me wrong I think your idea to run a menu of actions is great, but I still think there is somewhat of a difference in bringing up a menu to select actions or scripts when you right click on white, versus the immediately running of scripts - script resource files - which can be changed by other scripts. No big deal, but that's all I was saying.
Re: Expanding "CEA_ListRightClickOnWhite=XXX" Tweak
The script you supply to CEA_*RightClickOnWhite_Script can do anything you desire, it doesn't have to be a menu.klownboy wrote:Hi TheQwerty, I see your point and don't get me wrong I think your idea to run a menu of actions is great, but I still think there is somewhat of a difference in bringing up a menu to select actions or scripts when you right click on white, versus the immediately running of scripts - script resource files - which can be changed by other scripts. No big deal, but that's all I was saying.
The example I posted above is just that - an example. It demonstrates how you can have it show a menu of all of the options available by tweaking.
You can use what I posted and just modify the 'Show Menu' script to do be smarter if you want or write your entirely own script...
Code: Select all
"Show Menu" //doesn't always show a menu now...
if (<curpath> LikeI "<xydata>*) {
Load 'CEA\XYDATA_Menu.xys',, 'f';
} elseif (<curpath> LikeI "%windows%*") {
Echo 'Access Denied!';
} elseif (<curpath> LikeI 'paper:*') {
#770; // View | Paper Folders | - submenu -
}I still don't believe there is anything actually gained by being able to change the value of the CEA_*RightClickOnWhite_Script keys on-the-fly other than making this much more complicated.
-
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
Thanks TheQwerty,
Yes, it was non-menu scripts that I originally had in mind, when I requested it. Though the menu scripts like Vertical Toolbar script do seem ideal for this situation. We could even set a script up to perform different actions based on the current file extension in addition to what you mentioned <curpath> since the right click on White Space doesn't affect the currently selected file. If it's an image open it with ImageEye, if it's a video run Media Player Classic etc. It could be another way to execute/open a file in addition to PFA. I have another script set to do something similar by hitting shift-enter on a selected file.TheQwerty wrote:CEA_*RightClickOnWhite_Script can do anything you desire, it doesn't have to be a menu
XYplorer Beta Club