Categorized Favorites

Discuss and share scripts and script files...
Post Reply
tiago
Posts: 589
Joined: 14 Feb 2011 21:41

Categorized Favorites

Post by tiago »

This is a ripoff of http://www.xyplorer.com/xyfc/viewtopic.php?f=7&t=14376 - Method - XYscriptsGrouping, original code by user SkyFrontier as a backend for the idea described here: http://www.xyplorer.com/xyfc/viewtopic.php?f=3&t=15837
and here:
http://www.xyplorer.com/xyfc/viewtopic.php?f=3&t=15825

Some things cannot be automated so pay attention:

have a list of favorites: files, folders, executables with parameters, containing EXISTENT, ACTIVE ITEMS ONLY otherwise categorization will stale. For instance:

Code: Select all

C:\Program Files (x86)\Skype
C:\Users
"Folders|:showfolders"
C:\Program Files (x86)\Skype\Phone\Skype.exe
C:\Program Files (x86)\Google\Chrome\Application\chrome.exe
"C:\soft|:steps"
C:\Windows\System32\control.exe /name Microsoft.Sound
C:\Windows\System32\control.exe desk.cpl,Settings,@Settings
C:\Windows\System32\control.exe /name Microsoft.MobilityCenter
C:\Windows\System32\control.exe /name Microsoft.DevicesAndPrinters
C:\Windows\System32\control.exe /name Microsoft.Keyboard
C:\Windows\System32\control.exe /name Microsoft.Mouse
C:\Windows\System32\control.exe desk.cpl,Themes,@Themes
C:\Windows\System32\control.exe /name Microsoft.AutoPlay
C:\Windows\System32\control.exe /name Microsoft.System
"commands|:queue"
D:\soft\xyplorer\XYplorer.exe
D:\soft\Steam\Steam.exe
"D:\soft|<xy>"
As a general rule group names must be stated after each group of items. In the example they will be four:

"Folders|:showfolders"
"C:\soft|:steps"
"commands|:queue"
"D:\soft|<xy>"

Note that icons are supported (my enhancement over original code).

Now copy that list and feed the variable "$a" in the following script:
XYscriptGroups_Favs1_CreateList.xys
-the script already has the addition of the sample list.

Now run the script. After the small beep, copy the content of the popped window. In case, this:

Code: Select all

"Skype|:select"
   goto "C:\Program Files (x86)\Skype"
"Users|:select"
   goto "C:\Users"
"Folders|:showfolders"
"skype|c:\program files (x86)\skype\phone\skype.exe"
   run "C:\Program Files (x86)\Skype\Phone\Skype.exe"
"chrome|c:\program files (x86)\google\chrome\application\chrome.exe"
   run "C:\Program Files (x86)\Google\Chrome\Application\chrome.exe"
"C:\soft|:steps"
"control Sound|c:\windows\system32\control.exe"
  run '"C:\Windows\System32\control.exe" /name Microsoft.Sound'
"control Settings|c:\windows\system32\control.exe"
  run '"C:\Windows\System32\control.exe" desk.cpl,Settings,@Settings'
"control MobilityCenter|c:\windows\system32\control.exe"
  run '"C:\Windows\System32\control.exe" /name Microsoft.MobilityCenter'
"control DevicesAndPrinters|c:\windows\system32\control.exe"
  run '"C:\Windows\System32\control.exe" /name Microsoft.DevicesAndPrinters'
"control Keyboard|c:\windows\system32\control.exe"
  run '"C:\Windows\System32\control.exe" /name Microsoft.Keyboard'
"control Mouse|c:\windows\system32\control.exe"
  run '"C:\Windows\System32\control.exe" /name Microsoft.Mouse'
"control Themes|c:\windows\system32\control.exe"
  run '"C:\Windows\System32\control.exe" desk.cpl,Themes,@Themes'
"control AutoPlay|c:\windows\system32\control.exe"
  run '"C:\Windows\System32\control.exe" /name Microsoft.AutoPlay'
"control System|c:\windows\system32\control.exe"
  run '"C:\Windows\System32\control.exe" /name Microsoft.System'
"commands|:queue"
"xyplorer|d:\soft\xyplorer\xyplorer.exe"
   run "D:\soft\xyplorer\XYplorer.exe"
"steam|d:\soft\steam\steam.exe"
   run "D:\soft\Steam\Steam.exe"
"D:\soft|D:\_BKP\soft\xyplorer17\XYplorer.exe"
Get the following script:
XYscriptGroups_Favs2.xys
and feed its "$a" variable with the previously generated list, which is already done in the attached script.

Run this second script and there you are: a categorized favorites list, hopefully containing even your parametrized commands, ready for usage at the clipboard after you pick one of the presented items. Like this:

Code: Select all

"1 - Folders - 2 item(s)|:showfolders" Load("*","_ 00 01;-;_ 00001a;_ 00002b;_ 00003c;")
"Skype|:select : _ 00001a"   goto "C:\Program Files (x86)\Skype";
"Users|:select : _ 00002b"   goto "C:\Users";
" : _ 00003c";
"1 <- back |: 00 |1 : _ 00 01"   Load("*") ;
"2 - C:\soft - 2 item(s)|:steps" Load("*","_ 00 02;-;_ 00004d;_ 00005e;_ 00006f;")
"skype|c:\program files (x86)\skype\phone\skype.exe : _ 00004d"   run "C:\Program Files (x86)\Skype\Phone\Skype.exe";
"chrome|c:\program files (x86)\google\chrome\application\chrome.exe : _ 00005e"   run "C:\Program Files (x86)\Google\Chrome\Application\chrome.exe";
" : _ 00006f";
"2 <- back |: 00 |3 : _ 00 02"   Load("*") ;
"3 - commands - 9 item(s)|:queue" Load("*","_ 00 03;-;_ 00007g;_ 00008h;_ 00009i;_ 00010j;_ 00011k;_ 00012l;_ 00013m;_ 00014n;_ 00015o;_ 00016p;")
"control Sound|c:\windows\system32\control.exe : _ 00007g"  run '"C:\Windows\System32\control.exe" /name Microsoft.Sound';
"control Settings|c:\windows\system32\control.exe : _ 00008h"  run '"C:\Windows\System32\control.exe" desk.cpl,Settings,@Settings';
"control MobilityCenter|c:\windows\system32\control.exe : _ 00009i"  run '"C:\Windows\System32\control.exe" /name Microsoft.MobilityCenter';
"control DevicesAndPrinters|c:\windows\system32\control.exe : _ 00010j"  run '"C:\Windows\System32\control.exe" /name Microsoft.DevicesAndPrinters';
"control Keyboard|c:\windows\system32\control.exe : _ 00011k"  run '"C:\Windows\System32\control.exe" /name Microsoft.Keyboard';
"control Mouse|c:\windows\system32\control.exe : _ 00012l"  run '"C:\Windows\System32\control.exe" /name Microsoft.Mouse';
"control Themes|c:\windows\system32\control.exe : _ 00013m"  run '"C:\Windows\System32\control.exe" desk.cpl,Themes,@Themes';
"control AutoPlay|c:\windows\system32\control.exe : _ 00014n"  run '"C:\Windows\System32\control.exe" /name Microsoft.AutoPlay';
"control System|c:\windows\system32\control.exe : _ 00015o"  run '"C:\Windows\System32\control.exe" /name Microsoft.System';
" : _ 00016p";
"3 <- back |: 00 |3 : _ 00 03"   Load("*") ;
"4 - D:\soft - 2 item(s)|C:\soft\xyplorer_16\XYplorer.exe" Load("*","_ 00 04;-;_ 00017q;_ 00018r;_ 00019s;")
"xyplorer|d:\soft\xyplorer\xyplorer.exe : _ 00017q"   run "D:\soft\xyplorer\XYplorer.exe";
"steam|d:\soft\steam\steam.exe : _ 00018r"   run "D:\soft\Steam\Steam.exe";
" : _ 00019s";
"4 <- back |: 00 |3 : _ 00 04"   Load("*") ;
Pretty cool, eh?
:ninja:

Thanks to user klownboy who shared the links that gave me the original code to work with. :beer:
To see the attached files, you need to log into the forum.
Power-hungry user!!!

tiago
Posts: 589
Joined: 14 Feb 2011 21:41

Re: Categorized Favorites

Post by tiago »

Small updates.
XYscriptGroups2_Favs1_CreateList.xys
XYscriptGroups2_Favs2.xys
XYscriptGroups2_Favs3_Example.xys
To see the attached files, you need to log into the forum.
Power-hungry user!!!

Post Reply