Script 2FaVs.xys and 2FavFolders.xys

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

Script 2FaVs.xys and 2FavFolders.xys

Post by klownboy »

Script 2FavFolders2FavFiles.xys.
- This script, 2FavFolders2FavFiles.xys now combines 2FaVs.xys and 2FavFolders.xys into a single script.
- As on the previous versions, the basic purpose is to have 2 Favorite Folders and 2 Favorite Files sets and that you can quickly switch between.
- Left click on CTB to cycle Favorite Folder sets and Right click to cycle Favorite File sets
- As a precaution, I recommend saving your current Favorites to a text file until you're sure the script is set properly
Hit F6 and ctrl-A and ctrl-C to copy in List management
- Assign the script to a CTB using load "<xyscripts>\2FavFolders2FavFiles.xys;" to left, right and middle click actions (even if you don't have or use middle click)
- Run the script from the CTB prior to running from a UDC.
- Assign the script to UDCs as follows:in the category "Run script":(e.g., numpad 7)
Script UDC assignment numpad 7
userbutton "48", "1"; //where "48" is you CTB # assigned left click to display fav folders (2 sets)
userbutton "48", "2"; //where "48" is you CTB # assigned right click to display fav files (2 sets) (e.g., numpad 7), one for Favorite Folders, one for Favorite Files
- Also assign the script to control modified keys of the above (e.g., control- numpad 7) or whatever the assigned key above
userbutton "48", "4"; //where "48" is you CTB # assigned middle click to save any Fav set changes to XYplorer.inig., numpad 7), one for Favorite Folders, one for Favorite Files
- Don't try to run the script from the address bar or run script.
- You can cycle beween the 2 Favorite File sets by pressing the assigned key via a UDC or by clicking CTB
- Pressing the control modified UDC key or shift click of ether left or right button on the CTB or middle click of the CTB will bring up a menu where you can either save the explorer.ini favorites to the script or visa versa.
- On the FIRST run only, the script automatically sets up your existing or normal Favorite Files as set #1 saved to the script's ini section
- It will then send you to List Management Favorite Files to enter favorites for Set #2. It's best to have your set #2 additional Favorites ready to paste into LM. Once done hit enter.
- Set #2 Favorite Files are saved to the script's INI section. Set #1 as well.
- You can modify your Favorites (whatever set is active via List Management -Favorite Files). Please see viewtopic.php?p=210099#p210099 in this thread for details.

Note: If you used the previous version, to make the transition easier, set your Favs to set #2 as seen on the CTB tooltip and go to List Management and copy what you had set up for Favorites set #2 and then make sure you are currently on set #1 of Favorite Files and Favorite Folders and properly saved before proceeding with setting up the new script.

If anyone comes up with some better icons to distinguish Favorite sets #1 and #2, please let me know.
2FavFiles2favFolders_v1.0.zip
(2.09 KiB) Downloaded 31 times
Script 2FaVs.xys and 2FavFolders.xys. Written based on a wish here viewtopic.php?t=25934 and for shits and grins.

- The idea of this script is to have 2 Favorite File sets that you can quickly switch between.
- I provided a Favorite Folders version as well, 2FavFolders.xys
- As a precaution, I recommend saving your current Favorites to a text file until you're sure the script is setup properly
Hit F6 and ctrl-A and ctrl-C to copy in List management
- First assign the script to a CTB using load "<xyscripts>\2FaVs.xys;" left and right click action
- Run the script from the CTB prior to running from a UDC.
- Assign the script to a UDC in the category "Load script file" (e.g., numpad 7)
- Also assign the script to control modified key (e.g., control- numpad 7) or whatever the assigned key above
- Don't try to run the script from the address bar or run script.
- You can cycle between the 2 Favorite File sets by pressing the assigned key via a UDC or by clicking CTB
- Pressing the control modified UDC key or right click of the CTB will ensure XYplore.ini is updated
- On the FIRST run only, the script automatically sets up your existing or normal Favorite Files as set #1 and saves them to the script's ini section.
- It will then send you to List Management Favorite Files to enter favorites for Set #2. The normal Favs (set #1) will be displayed there. You can modify those, add to them, or paste in completely new ones. It's best to have your set #2 additional Favorites ready to paste into LM. Once done hit enter. These new favorites will become set #2.
- Set #2 Favorite Files are saved to the script's INI section.
- You can modify your Favorites (whatever set is active via List Management -Favorite Files), but make sure you save.
- If you would rather have the script only cycle the set without actually displaying the Favorite Files, comment out // #550; or #564 around line 84
2FaVs_v1.0.zip
(2.56 KiB) Downloaded 42 times
Last edited by klownboy on 15 Apr 2023 20:22, edited 1 time in total.
Windows 11, 22H2 Build 22621.1555 at 100% 2560x1440

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

Re: Script 2FaVs.xys and 2FavFolders.xys

Post by klownboy »

Added a new script which essentially does everything that the previously posted 2 scripts did in one single script - where you can switch between 2 Favorite Folder sets by normal left clicking a CTB and switch between 2 Favorite File sets by right clicking a CTB. There's a cross save mode between the script and XYplorer.ini and visa versa with a middle click and you can do all this via UDCs as well. See the first post for more information.
Windows 11, 22H2 Build 22621.1555 at 100% 2560x1440

mazot
Posts: 42
Joined: 20 Apr 2020 23:19

Re: Script 2FaVs.xys and 2FavFolders.xys

Post by mazot »

heres a set of stars developed from the clipboard.
also 2 folder icons I downloaded.
stars.zip
(28.32 KiB) Downloaded 28 times

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

Re: Script 2FaVs.xys and 2FavFolders.xys

Post by klownboy »

Thanks mazot. If anyone wants to substitute any of these icons, you can swap them out for the XY built-in icons :favs / :favs- and :favfiles / :favfiles- on lines 129 and 130 of the script. I used those for compatibility.
Windows 11, 22H2 Build 22621.1555 at 100% 2560x1440

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

Re: Script 2FaVs.xys and 2FavFolders.xys

Post by klownboy »

Another set of icons for Favorite Folders set #1 and #2 and Favorite Files set#1 and #2. The 2 lines in the script (129/130) should look like this. I only added the set number to the smaller sizes needed for CTBs - 16, 24, 32.

Code: Select all

   if($trigger =="1") {$favICON = $NewFav == "1"?"<xyicons>\folder_1.ico":"<xyicons>\folder_2.ico";}
   if($trigger =="2") {$favICON = $NewFav == "1"?"<xyicons>\favorites_1.ico":"<xyicons>\favorites_2.ico";}
Attachments
FavoriteFoldersFilesIcons.zip
(98.17 KiB) Downloaded 24 times
Windows 11, 22H2 Build 22621.1555 at 100% 2560x1440

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

Re: Script 2FaVs.xys and 2FavFolders.xys

Post by klownboy »

After a week or so of posting the script, I had to think a little today on how to modify Favorite Folders or Files set #1 or #2. I figured if I was fuzzy on it, someone else may be as well. So I clarified the instructions on how it's accomplished. It may seem like a lot of verbiage but it's very easy. These instructions apply to the new script, 2FavFiles2FavFolders.xys.

Steps to edit and save Favorite Folders or Favorite files set #1 or #2 any time after the initial setup.
- Switch to favorites set #1 or #2 - whatever set you want to update. Use the normal switch menu. You can tell by either the CTB tooltip note or icon (if you used ones that denotes the set#).
- Open List Management for that Favorite Folder or Files to update Tools > List Management > Favorite Folders.
Note: The set# you are currently on should be the one that LM displays.
- Do your editing or adding of Fav folders or Fav Files items. It may be easier to use edit mode by hitting F6
- Next, save your LM changes to XYplorer.ini - Hit save button.
- Now use the script option to save the XYplorer.ini Favs to the script - hold shift while clicking CTB or use a modified UDC to enter the script's shift save menu
- Use the 1st option to save the XY ini to the script...that's it.
Windows 11, 22H2 Build 22621.1555 at 100% 2560x1440

Post Reply