AppLoader 0.9.6.1a
Applications loader
Lister plugin for Total Commander 32 bit
© Maximus's Solutions 2006-2012
http://maximus.in.ua


Contents
Description
Installation
Examples of convenient use
Limitations
Configuration
Version history


Description
This plugin allows you to open chosen files using the associated applications in cases where it is possible to use the internal viewer (Lister).
The main feature of this plugin is that you can open the file in any application of these modal windows Total Commander as «Find Files» and «Synchronize directories» as well as in the Overwrite dialog, which can not be done by any other means.
No less pleasing is provided feature to run associated application by means hotkey for an already opened file in the Lister.
Also plugin can work with selected files, has a flexible configuration of execute conditions, and feature to disable using the Scroll Lock key.


Installation
Automatic
  1. Enter in the archive with the plugin (Ctrl+PgDn) and Total Commander will ask you to install it
  2. Follow the instructions of Total Commander
Manual
  1. Unpack the contents of the archive to a separate directory
  2. Install plugin:
    • { Configuration → Options... → Plugins → Lister plugins → Configure }
    • Add AppLoader.wlx to the plugins list
  3. Move AppLoader on the top of the plugins list

Examples of convenient use

Limitations

Configuration
The plugin can be configured by editing the file AppLoader.ini which should be in plugin installation folder. Create this file manually or copy from folder IniSample. If this file is not found when plugin is loading into memory, it will be copied automatically from the folder IniSample.
The following are the keys to the configuration file with descriptions. The key value specified after the '=' is the default value, ie value that will be used if key is not exists in the file.

Section
Key
Description
[Options]
Configuring plugin behavior
ReadOptionsEveryTime=0 Specifies when the settings are read from this section:
0: only when the plugin is loaded into memory;
1: for each access to the plugin.
ScrollLockControl=0 Enables control with Scroll Lock key:
0: plugin is always on;
1: enable plugin by Scroll Lock key.
ModalOnly=0 Controls plugin executing depending on the type of window:
1: execute only in modal windows («Find Files», «Synchronize directories», Overwrite dialog);
0: execute conditions defined by keys FindFiles, SyncDirs, TCWindow, QuickView, Lister4, OverWrite.
FindFiles=1 If ModalOnly=0, controls plugin executing
(1: allow; 0: disallow)
in window «Find Files».
SyncDirs=1 in window «Synchronize directories».
TCWindow=1 in main window of Total Commander.
QuickView=0 with quick view.
Lister4=0 in Lister when activated view mode with plugins (key 4) or when switching between files (keys N and P).
OverWrite=1 in Overwrite dialog.
IfIsExtOnly=0 Controls plugin executing depending on the file extension:
1: execute only for files with extensions, defined in section Editor of file AppLoader.ini or in section Extensions of Total Commander configuration file (see key UseTCExtensions);
0: execute for files with any extension.
ListerState=1 Specifies the action on the Lister window (including quick view) after plugin executing:
0: leave open;
1: when file was extracted/downloaded from archive/FTP-server/WFX-plugin: normal Lister window – hide, quick view window – leave open; in other cases – close;
2: close anyway.
Note: When opening a file in Lister from archive/FTP-server/WFX-plugin Total Commander previously extract/download it to temporary directory and delete immediately after closing the Lister. In order for plugin to give applications the ability to work with these files, there is need to keep the Lister window unclosed. The key value of 1 is provided specifically for such situations – and the file will open, and the Lister window will not interfere.
Note: When plugin executed directly in the Lister window (option Lister4=1), any actions with the window will not be made.
NextPlugin=1 If ListerState=0 Specifies the behavior for the case where Lister is left open after plugin executing:
1: switch Lister to the next appropriate plugin;
0: leave AppLoader in Lister.
ParamsMode=1 Defines how to pass command line parameters to the applications (see explanations and examples):
0: Parameters by application. Files divides into groups depending on association with applications. Starts separate copy of application for each group. Command line parameters are taken from section Editor (key - full name of application).
1: Parameters by extension. Start type defined by key ParamsByExtMode.
ParamsByExtMode=0 If ParamsMode=1 Defines how to pass command line parameters to the applications (see explanations and examples):
0: Files divides into groups depending on association with applications. Starts separate copy of application for each group. Command line parameters are taken from section Editor (key that contains extension of first file in group).
1: Files divides into groups depending on extension. Starts separate copy of application for each group. Command line parameters are taken from section Editor (key that contains extension of group files).
2: Starts separate copy of application for each file. Command line parameters are taken from section Editor (key that contains file extension).
Note: If the extension is present in several keys, preference will be given to the key, which contains only one extension, if such key is not present will be used first key that contains the required extension.
UseTCExtensions=0 Defines source of application associations by extensions:
1: section Extensions in Total Commander configuration file;
0: section Editor in file AppLoader.ini.
CopySearchTextToClip=1 When plugin execute in dialog «Find Files» this option allows to copy search text into the clipboard, if checked search option «Find text»:
1: enable function;
0: disable function.
DefaultEditor=notepad If IfIsExtOnly=0 Default application. Name of the application which will run for file types (extensions) that do not have their own application.
DefaultEditor_params= If IfIsExtOnly=0 and ParamsMode=0 Command line parameters of default application specified in the key DefaultEditor.
[Editor]
Names and command line parameters of applications
aaa= Name of application which is associated for files with extension aaa.
bbb,ccc= Name of application which is associated for files with extensions bbb and ccc.
aaa_params= Command line parameters of application which is associated for files with extension aaa.
bbb,ccc_params= Command line parameters of application which is associated for files with extensions bbb and ccc.
FullAppName= Command line parameters for application with full name FullAppName.
[HotKeys]
Hot keys
See list of key codes. If code is not defined hot key will not assign. Can be used both decimal and hexadecimal code values. For example, F12 – 123 or 0x7B.
Available modifier values: A – Alt, C – Control, S – Shift. Sample: CAS – Control+Alt+Shift.
AppFromLister_key= Code of hot key (for example, 123 – F12), which can be used in Lister to open the file with associated application.
AppFromLister_mod= Modifier for hotkey specified in the key AppFromLister_key.
DefSysAppFromLister_key= Code of hot key (for example, 0x78 – F9), which can be used in Lister to open the file with associated in OS application.
DefSysAppFromLister_mod= Modifier for hotkey specified in the key DefSysAppFromLister_key.
[TCPos]
Positions of Total Commander interface elements
If CopySearchTextToClip=1 these keys used to search for interface elements by their location.
IsSearchTextLeft=5 Position of top left corner of option «Find text» in dialog «Find Files» (for Total Commander 8.01: 5; 116).
IsSearchTextTop=116
SearchTextLeft=85 Position of top left corner of field «Find text» in dialog «Find Files» (for Total Commander 8.01: 85; 114).
SearchTextTop=114

Notes on file names: If name of application is value but not a key (i.e. placed on the right of the '='), in its name:
Notes on file extensions: Besides the usual extensions also can be used the special extensions:
Notes on command line parameters:



Explanations on work keys ParamsMode and ParamsByExtMode.
When executed plugin for a single file (that is, from modal dialogs, Lister or for file under cursor in Total Commander file window) will be started only one application. In this case, if ParamsMode=1, then for each of the values ​​ParamsByExtMode passing the command line parameters to application will be performed the same way – as an exception in the case of a single file.
If the executing occurs from file window of Total Commander, while more than one file is selected, there are several variants of forming commands to run one or more applications. This example illustrates how the plugin works at different values of keys ParamsMode and ParamsByExtMode.
In active panel in the directory D:\files\ selected the following files:
file0.ext0
file1.ext0
file0.ext1
file1.ext1
file0.ext2
In section Editor presents the following strings:
[Editor]
ext1=C:\folder\dir\app0.exe
ext0,ext2=D:\path\app1.exe
ext1_params=-p1 -p2
ext0,ext2_params=/key0
ext0_params=/key1
C:\folder\dir\app0.exe=-p3
D:\path\app1.exe=/key3
Applications will be run this way:
1. If ParamsMode=0
"D:\path\app1.exe" "D:\files\file0.ext0" "D:\files\file1.ext0" "D:\files\file0.ext2" /key3
"C:\folder\dir\app0.exe" "D:\files\file0.ext1" "D:\files\file1.ext1" -p3
2. If ParamsMode=1, ParamsByExtMode=0
"D:\path\app1.exe" "D:\files\file0.ext0" "D:\files\file1.ext0" "D:\files\file0.ext2" /key1
"C:\folder\dir\app0.exe" "D:\files\file0.ext1" "D:\files\file1.ext1" -p1 -p2
3. If ParamsMode=1, ParamsByExtMode=1
"D:\path\app1.exe" "D:\files\file0.ext0" "D:\files\file1.ext0" /key1
"C:\folder\dir\app0.exe" "D:\files\file0.ext1" "D:\files\file1.ext1" -p1 -p2
"D:\path\app1.exe" "D:\files\file0.ext2" /key0
4. If ParamsMode=1, ParamsByExtMode=2
"D:\path\app1.exe" "D:\files\file0.ext0" /key1
"D:\path\app1.exe" "D:\files\file1.ext0" /key1
"C:\folder\dir\app0.exe" "D:\files\file0.ext1" -p1 -p2
"C:\folder\dir\app0.exe" "D:\files\file1.ext1" -p1 -p2
"D:\path\app1.exe" "D:\files\file0.ext2" /key0
Keep in mind, if the application is run with multiple files (for example, "D:\path\app1.exe" "D:\files\file0.ext0" "D:\files\file1.ext0" "D:\files\file0.ext2"), all of them will be opened in this application only if it is multiple document application. Otherwise, the application will only open the first file.

Configuration of Total Commander
AppLoader behavior in some cases may depend on the Total Commander settings, made ​​through its configuration dialog or configuration file.

Configuration dialog
Configuration file
Description
Page «Edit/View», options in group «Viewer for F3» Section [Configuration], key Viewertype Used by plugin to determine the behavior in the presence of selection in the Total Commander file panels.
Page «Edit/View», button «Associations...» Section [Extensions] Can be used by plugin for replacement section Editor of own configuration file.
  Section [Configuration], key GetTextMode Used by plugin to determine the format in which Total Commander will return a list of selected files. When the key value is 0, plugin will not work with the selected files whose names contain spaces.

Full description of these settings can be found in the Total Commander help file.


Version history
[0.9.6.1a] [23 Sep 2012] [0.9.6.1] [15 Sep 2012] [0.9.6.0] [07 Sep 2012] [0.9.5.0] [21 Jun 2009] [0.9.0.0] [03 Apr 2008] [0.8.0.0] [15 Mar 2007] [0.7.5.0] [06 Mar 2007] [0.7.0.0] [28 Dec 2006] [0.6.0.0] [16 Oct 2006] [0.5.0.0] [03 Oct 2006] [0.4.0.0] [20 Aug 2006] [0.3.0.0] [04 Aug 2006] [0.2.0.0] [02 Aug 2006] [0.1.0.0]