CEA_DoubleClickonWhiteScriptChanger

Discuss and share scripts and script files...
Post Reply
klownboy
Posts: 4109
Joined: 28 Feb 2012 19:27

CEA_DoubleClickonWhiteScriptChanger

Post by klownboy »

CEA_Double-Click on White, version 1.3
Don recently issued beta v25.50.0103 which gave us a method to change the assigned script used for CEAs. That beta basically negates the method used in earlier version of this script. The earlier script used a variable as the assigned script file and by changing the variable value to another script, changed the CEA action.

In the new script I've opted for a common menu used for the tree, list, tab, and breadcrumb Double-Click on White CEAs. This script is only used for CEA script files, not the common CEA actions like "back" or "go up" or actual scripts, etc. Obviously my script files used will not be yours. So again this is an example script that you have to modify to designate your own script files. Using a common script menu (i.e., the same menu for each of the CEA Double-Click White areas) also simplifies entering you own script files instead of mine.

Not a huge deal obviously since it's not something you'd be using that often. You can go into Configuration > CEAs and change the script files, but it does make doing that significantly easier and quicker once you supply the script file names.

It's set up to only use the script file basename (e.g., SessionManager not SessionManager.xys or <xyscripts>\SessionManager).

The common menu which must be modified for your CEA script files.
Common menu layout:

Script title to display;<->Script base filename (no folder or extension);icon
Example:

Code: Select all

  $commonMENU = <<<MENU
Session Manager;<->SessionManager;:tabsets
Vertical Toolbar;<->vTB;<xyicons>\panel(03a).ico
Tabs Home;<->TabsHomeCloseRightofRoaming;:home
XY Menu;<->XYmenu_NESTED;<xyicons>\Combined\XY_Application Folder.ico
WhiteSpaceDoubleClick;<->CEA_WSDC;:favs
MENU;
The script does change the "action" block for the 4 CEAs to "Run script". You can comment out the 2 lines noted in the function after the first run since it's really not necessary after that. Please delete the old perm variable names used in previous versions.
Double Click on White Space.jpg
Double Click on White Space.jpg (82.08 KiB) Viewed 104 times
CEA_DoubleClickonWhiteScriptChanger_v1.3.xys
(2.37 KiB) Downloaded 6 times

OLD version:
This script is a rather simple idea. It allows the user to assign various scripts to your CEA Double Click on White Space for the List and Tree. One click on the menu item and you've changed your Double Click on white action. If you ever thought at some point it would be nice if I could do "this" instead of "that" when you double click on white, you may get some use out of it. Of course you could do the same with the right click and middle click as well. In lieu of this, you could do something similar, and I have, with a single script that can do multiple actions.

If you weren't around 5 years ago viewtopic.php?f=5&t=13508&start=30#p119602 or just forgot like me, the idea came from the fact that you can assign a perm variable in XYplorer's ini file for the CEA script which means you can change that script on the fly. Granted as I mentioned above, you could perform something similar in one script with different assignments, but this does make for a rather quick and simple method to change your CEA script assignments.

The script is really only an example script. Everyone has different ideas on what to assign to these CEAs. You'll have to edit the script variable, $DCmenu used in SC popupmenu to assign your own scripts, captions and icons.

The first section (see the script), which I have commented out, will automatically assign the variables to the Double Click on white for the tree and list in XYplorer.ini, but you'll have to uncomment the section. If you'd rather edit XYplorer.ini file manually, you can, by making the tweaks in Comment Section 2 and leave both Comment Section 1 and 2 commented out. If you use section 1, you can leave it uncommented if you want, the script will skip over the CEA assignments once it's done initially. Once the variables are assigned you could delete both comment sections.

Since Don recently added additional CEAs, I thought some use might be made of this. As I mentioned you could have addtional variable assignments for right and middle click as well. They could all be contained in the same script. Take care.
CEA_DoubleClickonWhiteScriptChanger_v1.1.JPG
CEA_DoubleClickonWhiteScriptChanger_v1.1.JPG (19.37 KiB) Viewed 1030 times
CEA_DoubleClickonWhiteScriptChanger_v1.1.xys
(3.58 KiB) Downloaded 106 times
CEA_DoubleClickonWhiteScriptChanger.xys
(2.42 KiB) Downloaded 100 times
Last edited by klownboy on 24 Feb 2024 15:29, edited 1 time in total.
Windows 11, 22H2 Build 22621.1555 at 100% 2560x1440

klownboy
Posts: 4109
Joined: 28 Feb 2012 19:27

Re: CEA_DoubleClickonWhiteScriptChanger

Post by klownboy »

Hi again, a quick update to this script. Version 1.1 is the latest.

- Added a marker which indicates which of the scripts is currently being used for Double Click on White Space in the List and Tree. See screen capture on first post.

- Cleaned up and revamped the menu slightly

- corrected an error in a SC setkey statement on the uploaded version - if you had uncommented out this first section to add the variable - this line was messed up: setkey "6", "CEA_ListDoubleClickRightClickOnWhite", "Settings"; If you did by chance happen to run that first section you would have had a incorrect line added to the ini file so you should delete that line with "CEA_ListDoubleClickRightClickOnWhite"...obviously wrong. The script would continue to exit without saving since the correct setting was not being changed. Fixed. :roll:

Thanks.
Windows 11, 22H2 Build 22621.1555 at 100% 2560x1440

klownboy
Posts: 4109
Joined: 28 Feb 2012 19:27

Re: CEA_DoubleClickonWhiteScriptChanger

Post by klownboy »

Please refer to the first post in this thread for an updated version. The new version [1.3] now takes advantage of Don's new scripting command CEA, in beta v25.50.0103. CEA(index, [action], [script]). The script no longer uses permanent variables. Thanks.
Windows 11, 22H2 Build 22621.1555 at 100% 2560x1440

klownboy
Posts: 4109
Joined: 28 Feb 2012 19:27

Re: CEA_DoubleClickonWhiteScriptChanger

Post by klownboy »

Shortly after uploading the script v1.3, I've come to the realization that not everyone ,including me, is going to want the same common menu for these 4 Double-Click on White menus. Although it isn't a bad idea, you would probably want to have some specific menu items for some CEA areas. With that in mind, you can limit the menu items in the common menu to as few as you want (e.g., 2 or 3 items). These would be menu items you'd like to see in all of the CEA double-click menus. You would then put more menu items specifically geared to particular CEA areas (Tree, list. tab, and breadcrumb). It's easily done in the existing version 1.3. For example, the Double-click on White in the Tree, pair down the common menu variable to what you're happy with and then simply add menu items either before and/or after $commonMENU:

Code: Select all

  $DCtreemenu = <<<ASSIGNMENTS
                    •  TREE  •
Filter Cycle Age & Size;<->FilterCycleAge&Size;:gvf
$commonMENU
Recent Folders&Favs;<->RecentFolders&Favs;:favfiles
ASSIGNMENTS;
Windows 11, 22H2 Build 22621.1555 at 100% 2560x1440

Post Reply