From aca92962f4f2b33e66280415e592f6ef0de6b339 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Martin=20R=C3=BCegg?= The The optional The section can have the following entry types, all of which are optional: While the In the following example, one top-level Either a Either a Dynamic Items
+Dynamic Items
-dynamic section adds new menu items to the context menu.dynamic section adds new menu items to the context menu.Sub-items
+Sub-items
var block to define "local" variables.
@@ -27,7 +27,7 @@
var block should be at the top of the section, the other entries can appear in any order.Example
+Example
item is created, that is
separated with a horizontal line from an adjacent sub-menu, which in turn has one sub-Properties
title or a image property is mandatory (set to a non-null value). For further details,
- please refer to the properties section below.Syntax
@@ -80,7 +80,7 @@
item( title = value [property = value [...] ])Properties
title or a image property is mandatory (set to a non-null value). For further details,
- please refer to the properties section below.
menus can have the following entry types, all of which are @@ -118,7 +118,7 @@
separators do not have any mandatory properties. Please refer to the properties section below for further details.
+ href="properties.html" class="uline">properties page for further details.separator
diff --git a/docs/syntax/properties.html b/docs/syntax/properties.html
index 83d95d3..5c0f215 100644
--- a/docs/syntax/properties.html
+++ b/docs/syntax/properties.html
@@ -65,11 +65,28 @@
Entry types
-The Applies column shows, whether the property applies to menus, items and/or separators. If set in
- bold, then the property is mandatory for the given type.
+The Types column shows to which entry types the property applies to,
+ where the following abbreviations are used. If set in bold, then the property is mandatory for the given type.
+
+
+ - se
+ - static entry, i.e. the
+ item
+ entry itself. Is basically required to evaluate if the process instructions are applied to any given target.
+
+ - st
+ - static target, i.e.
+ the menuitem of the existing menu to which the process instructions are applied
+
+ - dm
+ - dynamic menu
+ - di
+ - dynamic item
+ - ds
+ - dynamic separator.
+
+
Syntax
@@ -77,7 +94,7 @@
Property
- Applies
+ Types
Summary
@@ -85,36 +102,230 @@
Where
- M
-
-
- Display menuitem if true is returned. Allows the evaluation of arbitrary
+ si, dm, di, ds
+ Process given menuitem if true is returned. Allows the evaluation of arbitrary
expressions, e.g. if
+ href="/docs/functions/index.html#if" class="uline">if().
Default = true
+
+
+ Find
+ dm, di, ds
+
+
+ - For static items (required)
+ - Apply the current item's process instructions to any existing menuitem if their
title property matches the
+ pattern of the current item's find property.
+
+ - For dynamic items (optional)
+ Display the current menuitem if the pattern of its find property matches the
+ path name or path extension
+ of the selected files.
+ Default = null, which means any string is "matched".
+
+
+
+ - Syntax
+ -
+
find = '%pattern%'
+find = '%pattern%|%pattern%[...]'
+ where %pattern% can be one or
+ more
+ matching instructions (see Examples below). The
+ following characters do have special meaning:
+
+ | Use to separate patterns. If any one pattern
+ matches,
+ the property yields
+ true.
+
+ * Matches any number of characters. Is used as a
+ wildcard
+ to
+ match only the beginning or the end of the entire string (or word, if used in
+ combination with the exclamation mark !).
+
+ ! Negates the match of the current pattern, or
+ limits
+ the wildcard (*) to one word only.
+
+ "" the enclosed string is treated as a word.
+
+
+ A word is a sequence of
+ alphanumerical characters that is confined to the left and to the right by either a
+ space
+ , a non-word character (e.g. / or -), or the
+ beginning or the end of the entire string, respectively.
+ - Examples
+ -
+
+
+
+
+ Pattern
+ Matches any string that ...
+ Would match
+ Would not match
+
+
+
+
+ 'foo'
+ contains the literal string foo anywhere.
+ foo, foobar, afoobar
+ fo, f oo, bar
+
+
+ '"foo"'
+ contains the literal string foo as a whole word
+ only.
+
+ foo, foo/bar, some foo bar
+ foobar, foofoo, bar
+
+
+
+
+ '*foo'
+ ends with the literal string foo.
+ foo, barfoo, bar/foo
+ foobar, fooo, foo
+
+
+ 'foo*'
+ starts with the literal string foo.
+
+ foo, foobar, foo/bar
+ foobar, fo, yeti
+
+
+
+
+ '!foo'
+ does not contain the literal string foo anywhere.
+
+ fobar, fo, kung-fu
+ foo, foobar, barfoo/bar
+
+
+ '!"foo"'
+ does not contain the word
+ foo
+ fobar, kung fu bar, foobar
+ foo, kung foo bar, bar/foo/bar
+
+
+ '!*foo'
+ does not contain a word ending on
+ foo
+ foobar, fooo-fo
+ foo, foo bar, bar/foo
+
+
+ 'foo*!'
+ does not contain a word stharting
+ wit
+ foo
+ myFooBar, barFoo
+ foo, foobar, fo-fooo
+
+
+
+
+
+
For dynamic items the following syntax allows to match against file
+ extensions:
+
+
+
+
+
+ Pattern
+ Matches any file extension ...
+ Would match
+ Would not match
+
+
+
+
+ '.exe'
+ equal to .exe
+ setup.exe, notepad.exe
+ install.bat, shell.nss, shell.ex_,
+ file
+ without an extension.
+
+
+
+ '!.exe'
+ not equal to .exe
+ setup.exe.zip, video.mp4, shell.ex_,
+ file
+ without an extension.
+
+ setup.exe, shell.exe
+
+
+
+
+ '.exe|.dll'
+ equal to either .exe or .dll
+ shell.exe, shell.dll
+
+ shell.zip, shell.nss, file
+ without an extension.
+
+
+
+
+
+
+
+
+
+
+
Title
- M
- I
-
- Sets the caption of the menuitem.
- It is mandatory for menu and item entries, unless a image property is defined.
- Default = null
+ st, dm, di
+
+ Sets the caption of the menuitem.
+
Mode
- M
- I
- S
- Display menuitem by type of selection. The value has one of the following parameters
+ si, dm, di, ds
+ Display menuitem by type of selection. The value has one of the following
+ parameters
(of type string):
@@ -148,11 +359,11 @@
Type
- M
- I
- S
+ si, dm, di, ds
Specifies the types of objects for which the menuitem will be displayed.
- Possible values are shown below. Separate multiple types with the pipe character (|), in
+ Possible values are shown below. Separate multiple types with the pipe character (|),
+ in
which case the menuitem is displayed if any of the given types is matched.
To exclude a given type, prefix its value with the tilde character (~).
Expressions are not supported with this property.
@@ -264,22 +475,21 @@
Visibility (vis)
- M
- I
- S
+ st, dm, di, ds
Sets the visibility of a menuitem. Can have one of the following parameters:
Normal
- Enabled the menuitem.
+ Enable the menuitem.
Disable
- Disabled the menuitem.
+ Disable the menuitem.
Static
@@ -291,43 +501,17 @@
Display menuitem as label without an image
+
+ Note:The values Static and Label are not available for static targets.
+
Default = Normal
-
-
- Find
- M
- I
- S
-
- Display menuitem when the specified path name or path extension matches the current
- find property.
- Separate patterns by the pipe delimiter (|).
- Default = null
- Syntax
- find = 'exe' Find any word contains "exe"
- find = '"exe"' Match whole word only
- find = '*exe' Find a word that ends with
- find = 'exe*' Find a word that starts with
-
- find = '!exe' Find any word not contains "exe"
- find = '!"exe"' Search for any word not equal to "exe"
- find = '!*exe' Find a word that not ends with
- find = 'exe*!' Find a word that starts with
-
- find = '.exe' Find an equal extension for ".exe"
- find = '!.exe' Find an not equal extension for ".exe"
-
- find = '.exe|.dll' Find an equal extension for ".exe" or ".dll"
-
-
-
Separator (sep)
- M
- I
-
+ st, dm, di
Add a separator to the menuitem:
@@ -353,9 +537,8 @@
Position (pos)
- M
- I
- S
+ st, dm, di, ds
The position at which a menuitem should be inserted into the menu.
Position can have one of the following parameters:
@@ -393,9 +576,8 @@
Image, Icon
- M
- I
-
+ st, dm, di
The icon that appears in a menuitem. This property can be assigned as image files,
resource icons, glyph
or color. With one of the following parameters
@@ -427,15 +609,18 @@
Assign image from location path or resource icon.
+
+ Note:The value Cmd is not available for static
+ targets.
+
Default = null
Parent, Menu
- M
- I
- S
+ st, dm, di, ds
Move current menuitem to another menu.
Default = null
@@ -443,9 +628,7 @@
Command (cmd)
-
- I
-
+ di
The command associated with the menuitem. Occurs when the menuitem is clicked or
selected using a shortcut key or access key defined for the menuitem.
Default = null
@@ -454,10 +637,9 @@
Arguments (arg, args)
-
- I
-
- The command line parameters to pass to the di
+ The command line parameters to pass to the command property of a menuitem.
Default = null
@@ -465,9 +647,7 @@
Invoke
-
- I
-
+ di
Set execution type