Akete - FARR-specific file associations
Introduction
------------
The main point of this plugin is to be able to customize how files
with particular file extensions are opened. To achieve this end,
the user is expected to provide a configuration which specifies
associations between file extensions and corresponding methods of
opening files with those extensions.
The plugin provides additional functionality including support for:
* multiple possible methods of opening files via context menu items
* default context menu items (i.e. always appear in context menu)
* overriding of method to open files via an appropriate keyword
Configuration
-------------
The Akete plugin may be configured by using FARR User Variables.
FARR User Variables are accessible via "Program Options" ->
"Lists" -> "User Variables" in FARR's Options dialog box. The section
for Akete (may not exist unless manually created) begins with the
string [Akete]. (For more information regarding FARR User Variables,
in FARR's .chm Help File, see the section titled "User Variables -
Advanced Use" under "Advanced Use". The rest of the text assumes
familiarity with the FARR documentation content.)
Configuration details will be demonstrated through a series of examples.
After each example a general rule will be stated possibly followed by
some related notes.
Example 1
A configuration to get files with the extension 'txt' to be opened using
Wordpad might be:
[Akete]
txt=%PROGRAMFILES%\Windows NT\Accessories\wordpad.exe
Rule 1: <file-extension>=<path-to-executable>
Notes: The path to the executable may contain FARR Virtual Folder
names (see the FARR help file). Also, file extensions do NOT contain
the period character.
Example 2
A configuration to get files with the extension 'txt' to be opened by
(possibly additional instances of) Notepad++ might be:
[Akete]
txt=%PROGRAMFILES%\Notepad++\Notepad++ -multiInst "$$1"
Rule 2: <file-extension>=<launch-template-string>
Notes: The launch template string allows specification of command line
arguments. The plugin replaces the string $$1 by the path to the file to
be opened. Do NOT use the vertical bar character in a launch template
string -- the reason for this should become clear below.
Once a file extension has been associated with a path or launch template
string, it is possible to leverage this association so that any file
specified via FARR's text edit field is opened using the associated
path or launch template string.
For the examples above, if the text in FARR's text edit field looks like:
C:\boot.ini +withtxt
"launching" via FARR will open the file with path C:\boot.ini using
Wordpad in the case of the first example, and Notepad++ in the case of
the second example.
Notes: The keyword is assembled by prepending the file extension with the
string "with" (the default keyword prefix string).
Example 3
A configuration to override the default keyword prefix string with the
string "open" instead of "with", might be:
[Akete]
Options.KeywordPrefix=open
Rule 3: Options.KeywordPrefix=<keyword-prefix-string>
Notes: The user variable name is the fixed string "Options.KeywordPrefix".
The user variable value should probably be kept to a string composed of
numbers and letters -- other values such as spaces, pluses, and the like
are not likely to work. It may also be safer to not use uppercase letters
in the user variable value.
Example 4
A configuration to get files with the extension 'doc' to be opened using
whatever is configured for 'txt' might be:
[Akete]
txt=%PROGRAMFILES%\Windows NT\Accessories\wordpad.exe
doc=txt
Rule 4: <file-extension>=<file-extension>
Notes: For simplicity of configuration and implementation, if a file
extension appears on the right hand side of an equals sign, it may not
appear on the left hand side of the equals sign. Another way to phrase
this is that only one level of indirection is supported.
Example 5
A configuration to get the context menu of a file with extension 'txt'
to show context menu items for opening via Wordpad and Notepad++ might be:
[Akete]
txt=%PROGRAMFILES%\Windows NT\Accessories\wordpad.exe|%PROGRAMFILES%\Notepad++\Notepad++ -multiInst "$$1"
Rule 5: <file-extension>=<list-of-paths-or-templates>
Notes: The items in the list may be paths or launch string templates.
The vertical bar character is reserved for separating the items so it may
not be used in a path (doesn't tend to work in Windows anyway?) or a
launch template string. Opening of files via FARR's text edit field will
be handled using the first item in the list. It may be worth noticing
that a single path or launch template string might be viewed as a list of
one item.
A configuration to get the context menu of a file with extension 'txt'
to show context menu items for opening via Wordpad and Notepad, but leaves
handling of opening of such files untouched if done via FARR's text edit
field might be:
[Akete]
txt=|%PROGRAMFILES%\Windows NT\Accessories\wordpad.exe|C:\Windows\System32\notepad.exe
Notes: One can think of the list as having an empty first item.
Example 6
A configuration to get a file without a file extension to be opened by
Emacs might be:
[Akete]
Options.NoExtension=%PROGRAMFILES%\Emacs\bin\runemacs.exe
Rule 6: Options.NoExtension=<file-extension-or-list-of-paths-or-templates>
Example 7
A configuration to get the context menu of any file to show context menu
items for opening via Wordpad, Notepad, and Emacs might be:
[Akete]
*=%PROGRAMFILES%\Windows NT\Accessories\wordpad.exe|C:\Windows\System32\notepad.exe|%PROGRAMFILES%\Emacs\bin\runemacs.exe
Rule 7: *=<list-of-paths-or-templates>
Notes: One can think of the asterisk character as similar to a wildcard
pattern character.
In summary, the types of user variable names (strings to the left of the
equals sign) that may be specified include:
1) file extension
2) Options.NoExtension
3) *
4) Options.KeywordPrefix
and the types of user variable values (strings to the right of the equals
sign) that may be specified include:
1) list of paths and/or launch templates
2) file extension
Bugs
----
Probably
Credits
-------
Thanks go out to:
mouser
ecaradec
phitsc
raybeere
Plugin authors that provided source and/or comments on the forums
DC Forums participants
DC Supporters