Menu

Tree [88b032] default tip /
 History

Read Only access


File Date Author Commit
 COPYING-GPL.txt 2011-09-04 JGR JGR [ed02b4] Add a readme file and a GPL file.
 Jadded.cpp 2011-09-04 JGR JGR [e705ad] Add header to all source files.
 README.TXT 2011-09-04 JGR JGR [88b032] Add version to readme.
 jctxmenu.def 2011-02-26 JGR JGR [5d7ab9] Initial Commit
 jctxmenu.h 2011-09-04 JGR JGR [e705ad] Add header to all source files.
 jctxmenuext.cpp 2011-09-04 JGR JGR [e705ad] Add header to all source files.
 jctxmenuimpl.cpp 2011-09-04 JGR JGR [e705ad] Add header to all source files.
 jctxmenureg.cpp 2011-09-04 JGR JGR [e705ad] Add header to all source files.
 pcre.h 2011-02-26 JGR JGR [5d7ab9] Initial Commit

Read Me

jctxmenu version 2 beta 1: A highly configurable context menu shell extension for Windows, by Jonathan Rennison.
Menu items can be added to the context menus of any files or folders, based upon the file/folder attributes, extension, file type name, MIME type and/or file name (using PCRE regular expressions). Sub-menus and special menu flags are supported.
The shell extension is available in both 32 bit and 64 bit versions.
Be sure to install the correct version for your system, or the extension will not run.

jctxmenu is in part based on the example code: ctx_menu.

The shell extension may be registered and de-registered using the reg.bat and unreg.bat batch files.
These must be run in the same directory as the shell extension dll file.


At present there is no installer or GUI interface for modifying the two configuration files.
The two configuration files must be located in a directory named jctxmenu in the user's local Application Data directory.
On Windows Vista/7 this is typically: [User directory]\AppData\Local\jctxmenu
The files are named: sdlist.ini and extlist.ini
Changes to the configuration files take effect immediately.

The syntax of the configuration files is described below.
[x] means insert text here in place of x, where x describes what to enter
{...} means that ... is optional

Note: Any delimeter may be used in place of the pipe symbol | used here, however the use of the pipe is recommended.
Flag characters and the '?' character may not be used.

All numeric values are positive integers and may be in decimal or hexadecimal (0x prefix) notation.


sdlist.ini: Lists new subfolders to add

[ID],[parent ID],[display text]

The root menu has folder id 0
Do not duplicate folder IDs.


extlist.ini: Lists menu items to add

Standard menu item:
[flags]|[folder ID]|[menu text]|[action]{|Status text}
If status text is missing, it is taken to be the text string unless the : flag is set in which case it is the action string
The action string should be the name of an executable file.
If the menu item is clicked, for each selected file the following will be run: action "name of file"

Seperator (horizontal):
[flags]|[folder ID]||


Flags:
>	MF_MENUBREAK, new column
&	MF_DISABLED, action/click disabled
#	MF_GRAYED, menu item visibly grayed
*	MF_CHECKED, tick mark next to item
$	MF_HILITE, item highlighted
+	MFS_DEFAULT, default item
_	MFT_RIGHTORDER, right aligned
<	MF_MENUBARBREAK, new column with divider bar
:	Default status bar string = action string not menu text string
All file attribute flags, see below.


Conditional Blocks:
Menu items in a conditional block will be displayed only if every file selected matches the condition specified in the opening line. Blocks must be terminated with a block end line: ?). Blocks can be nested.
Else if and else constructs are available by using the '+' flag.


?[flags]@[Name of file type]
?[flags]![Name of file MIME type]
?[flags]=[File extension, including dot]
?[flags]?[PCRE Regular expression, not case-sensitive, not auto anchored, doesn't match blank, whole file name tested]

Flags:
+	Elseif (or if no condition following, else)
All file attribute flags, see below.

Block end:
?)

File Attribute flags:
Uppercase sets a condition that the file attribute must be true/present.
Lowercase sets a condition that the file attrubute must be false/not present.
A/a	Archive attribute
R/r	Read-only attribute
S/s	System attribute
D/d	Is a directory
E/e	Is encrypted
T/t	Temporary attribute
P/p	Is a sparse file
L/l	Is a reparse point/softlink
C/c	Is a compressed file
O/o	Offline attribute
I/i	Not indexed attribute

Some attributes are not available on all systems


Comments:
Lines starting with a ';' character are ignored.


Examples:

*|0|Menu Item|Name of program|Text to display in status bar

This always displays a menu item in the main menu, with a tick mark.


?@Microsoft Word Document
|1|Menu Item|Name of program|Text to display in status bar
?)

This displays a menu item in submenu 1, if all files selected have the file type name of "Microsoft Word Document"


?=.html
|0|Menu Item|Name of program|Text to display in status bar
?+
|0|A Different Menu Item|Name of program|Text to display in status bar
?)

This displays a menu item in the main menu, if all files selected have the file extension .html
Otherwise a different menu item is displayed in the main menu.

?dr?\.do[ct](x|html)?$
|0|Menu Item|Name of program|Text to display in status bar
?)

This displays a menu item in the main menu, if all files selected match the given regular expression (ie. are Microsoft Word files), are not directories and are not read-only.

??^c:
?=.txt
|0|Menu Item|Name of program|Text to display in status bar
?+!text/html
$|0|A Different Menu Item|Name of program|Text to display in status bar
?)
?)

This displays a menu item in the main menu, if all files selected match the given regular expression (ie. are on drive C), and have the file extension .txt
Or, this displays a different menu item in the main menu, highlighted, if all files selected match the given regular expression (ie. are on drive C), and have the file MIME type: text/html (ie. are HTML files).