Power Launcher v1.5alpha4 *Codename Bloater*
- Updated 2013-03-13 -
• [1.5a4] Easily associate scripts and subscripts (Labels) - In PowerLauncher-Definitions:
[pre]To open file or folder with XYS script, add name of script with ".xys" extension, e.g.
To call specific label in XYS script, use CL, e.g.
• Manage all your associations in one place, not only PowerLauncher LeftClick and RightClick, but also PortableFileAssociations DoubleClick (with a catchall from PFA > PL)
• Define 2 possible associations for everything (PFA's 2C, PL's LC, PL's RC), so if one program (e.g. local MediaPlayer x64) is unavailable, the secondary is used (e.g. Portable MediaPlayer x86)
• Use Keyboard Shortcuts to directly open your file with one of the 3(x2) PowerLauncher's associations
- Not (yet) for casual users who aren't into customization, sorry.
- Recommended to power users and users relying heavily on portability.
If you regularly need to open files with something else than the default application (on double-click), PowerLauncher (PL) is for you!
When edited and assigned to a Custom Toolbar Button (CTB), this script will:
- detect the type of the selected file (audio, video, pdf,...),
- detect the left click (LC) or Right Click (RC) on PowerLauncher button,
- launch a specific application or script to open this file (different depending on LeftClick or RightClick)
Use it also if you want to manage your Portable File Associations in the same place, with secondary associations in case the primary isn't found
Note: "open with" mode or "command-line arguments" mode are supported.
WARNING - Prerequisites:
• This script MUST BE EDITED (at least to input the path of your applications) - it won't work as is.
=> You must know how to retrieve the path of your applications (and command-line if necessary).
• For the RightClick function to work, you must have the following tweak enabled (set to 1):
It enables "Direct RightClick" by removing the "Edit, Customize..." from RightClicks on CTB. They can still be accessed by CTRL+RightClick on CTB.
• Install PowerLauncher and edit its Definitions INI file (procedure below)
• Select one or several similar files of your choice (e.g. "myvideo.avi" and "yourvideo.avi") then LC or RC on your PL button to have PowerLauncher open it with your associated application (e.g. VLC)...
Select one of your (meaningful) XYS scripts. LeftClick on PowerLauncher button, and see it running (without having to write "::load "MyOtherScriptsPath\blablabla"")
Other case scenarios:
• You want to show your videos at a party but aren't sure what player and codecs your friends have:
- On your flashdrive, put portable XYplorer and VLC (assigned to videos to the LC of PL)
=> now a LeftClick on PowerLauncher button will open all your videos through VLC.
• You like to have SumatraPDF as the default PDF viewer for its unmatched speed (I do!) but sometimes need more power:
- a regular DoubleClick can open your PDFs in SumatraPDF (assigned as the default PFA opener [Tools > Customize File Associations...])
- a PL-LC can open them in PDFXchange Viewer (assigned as PL-LC)
- a PL-RC can open them in Acrobat (assigned as PL-RC)
• You have to work on a friend/client computer and don't know if they have an archiver:
- a PL-LC can open all archives in the window of 7Zip portable (assigned as PL-LC)
- a PL-RC can extract your archives in place - as if you'd had the regular "Extract Here..." menu.
• The "Power" of this script depends on your ability to find the best apps and command lines to open your files. A few notes and examples are included in the default Definitions file.
• The Definitions file is a standard INI but it's not accepted by the board, so it's been renamed to XYS. You can leave it as is or rename its extension to ini as you see fit.
• Multiple items are directly supported through "OpenWith". They probably won't be processed through command-line (too much variation between apps).
For direct SC access to specific Click/Associations (for Keyboard Shortcuts, etc.), the subs are "_LeftClick", "_RightClick" and "_DoubleClick", so use e.g.: load "PowerLauncher.xys", "_LeftClick";
• PowerLauncher can be used to manage ALL your Double Click associations. Use at your own risk - though there's no reason it should break anything, and no slowdown can be noticed. Add the following entry on top in Tools > Customize File Associations: *>::load "PowerLauncher.xys";
(then copy your previous PFA associations to PL's Definition file).
• This script has become a terrible bloatware, I know...
But first and foremost: Enjoy & don't hesitate to post your questions, suggestions, comments...
### Update ###
• Have a look at the updated Definitions if you want to compare with yours.
• PL's Definitions file has been updated to use Primary and Secondary associations.
It's advised to download and use the new one, and copy/paste your associations from your old file.
• 1.5a3 > 1.5a4: Only comments about XYS have been updated in "PowerLauncher-Definitions", no need to update this file.
### Installation ###
To use this script, first, copy the two following files into XYplorer scripts folder: <xyscripts> , then either:
1. add load "PowerLauncher.xys"; to the "on click" AND "on right-click" of your custom button, or
2. use the following snippet (with Don's litteral instructions):
-a) Paste ::snippet; into the address bar and press ENTER. A text box will open to enter snippet.
-b) And here comes the copy+paste ready snippet. It will create a new button at the right end of your toolbar.
Code: Select all
Snip: CTB 1 XYplorer 11.60.0207, 05.10.2012 17:30:00 Action NewUserButton Name Power Launcher Icon :goprev ScriptL load "PowerLauncher.xys"; ScriptR load "PowerLauncher.xys"; FireClick 0
• Edit the Definitions file "PowerLauncher-Definitions.xys":
- Assign your favorite applications to the Left and/or Right Click and/or Double Click of the various categories (image, audio,...).
- If needed, add other categories (spreadsheet, database,...), with their associated filetypes (xls,db,...)
- If you're using XYplorer on different computers (portable mode), Assign your favorite portable applications to the Secondary associations.
### Changelog ###
* Simplified association with XYS scripts
+ Added direct association to XYS subscripts (Labels)
+ Added direct access to Left/Right/Double Click subscripts (for Keyboard Shortcuts, etc.)
+++ Added Secondary association option as fallback, if Primary association unavailable
+++ Added DoubleClick detection. For use with PFA catch-all (See notes) or other scripts
...If no association found or available, falls back to System default association
+ Added ability to run & parse file from other script by reading perm var $EXTCLICK = item path\name(s), e.g.
...perm $EXTCLICK = "<curitem>"; load "PowerLauncher.xys"; unset $EXTCLICK;
+ Added optional alternate INI file path (in <xydata>\[User])
++ Added folder support
++ Added multiple items support
+ Added support for selected item(s) without focus
* Hugely optimized and streamlined code