• DOWNLOAD:
— Latest version: Power Opener v3.40 — 2022-11-17 (publishing date)
— Changelog and previous versions: Power Opener Changelog
———————————————————————————
• TL;DR PURPOSE:
Assign various programs to open any file type, depending on the way you click on it or on Power Opener button.
☛ eg. on an image file:
— Middle-click on it opens it in XYplorer fullscreen preview
— Double-click on it opens it in FastStoneViewer fullscreen preview
— Left-click on button (with file selected) opens it in your RAW editor
— Right-click on button (with file selected) opens it in Photoshop
NB: A secondary program will be tried if the first one is not found (eg you’re running a portable XYplorer from another computer). So that’s up to 8 possibilities, depending on the way you click, and the availability of the programs.
———————————————————————————
• FOREWORD:
— This script is extremely easy to use
— But the first installation is a bit heavy — and customization is mandatory (you need to define which app you want for which file type)…
⇒ So it’s currently recommended for power users, and users relying heavily on portability.
More info below (work in progress), after the Install instructions.
———————————————————————————
• INSTALLATION:
⮞ A. Download the script (link above) and copy it into XYplorer scripts folder: <xyscripts>
⮞ B. Download the definition file (link above) and unzip it into XYplorer scripts folder: <xyscripts>
⇒ You will have PowerOpener.xys and PowerOpener.ini in your scripts folder.
⮞ C. Then, for the script (PowerOpener.xys),
C1. To use it with a button (left and right click on button), either:
C1a. add load "PowerOpener.xys"; to "On left click:" and "On right click:" of your custom button, or
C1b. use the following snippet:
— Paste ::snippet; into the address bar and press ENTER. A text box will open.
— Paste the following and press OK. A new button will be created 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 Opener
Icon
:steps
ScriptL
load "PowerOpener.xys";
ScriptR
load "PowerOpener.xys";
FireClick
1
XYplorer menu Tools > Customize File Associations… > New > paste this line
*>::load "PowerOpener.xys";
C3. To use it via middle-click on any file:
XYplorer menu Tools > Configuration > General | Custom Event Actions > Clicking on Items | Middle-click on file >
Action: Run script
Script: load "PowerOpener.xys";
⮞ D. Then, edit the definition file (PowerOpener.ini):
D1. Assign your favorite applications to the Left Click and/or Right Click (on button), and/or Double Click and/or Middle-Click (on file), for the various categories (image, audio,...). Detailed info available in PowerOpener.ini.
D2. If needed, add other categories (spreadsheet, database,...), with their associated filetypes (xls,db,...)
Tip: If you're using XYplorer on different computers (portable mode), Assign your favorite portable applications to the Secondary associations.
———————————————————————————
More detailed info and instructions [old, to be updated in 2023]
• FEATURES:
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 - Preserquisites:
• 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):
CTBNoRClickDefaultCommands=1
It enables "Direct RightClick" by removing the "Edit, Customize..." from RightClicks on CTB. They can still be accessed by CTRL+RightClick on CTB.
• USAGE:
• 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)...
• USAGE EXAMPLES:
Working example:
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.
• NOTES:
• 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).
But first and foremost: Enjoy & don't hesitate to post your questions, suggestions, comments...
Flux
———————————————————————————
Some tips, etc.
- Try to use XYS as "direct openers" for your items. e.g. assign a Picture Metadata Renamer XYS to the right click of your folders, a specific virus command-line, etc.
Why Power Launcher?
Because with only 1 button you:
- clean your catalog from cluttering with OpenWith lines
- get the fastest extra-opener for your common files (e.g. have your pictures 2C-opened in XnView, and PL-opened in Photoshop)
- enhance your portability without having to modify then restore your PFA each time.
- And of course, because you can!
Post your Best configs/combos!
Among my current favs/most-used are:
- LightAlloy as LC on videos (as my first portable ultralight player)
- Word as LC on docs (cause 2C runs the much faster TextMaker Viewer)
- MediaCoder as RC on audio
- XYS processed AntiVirus as RC on folders (cause I don't like resident AV)