From aca92962f4f2b33e66280415e592f6ef0de6b339 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20R=C3=BCegg?= Date: Mon, 13 Mar 2023 08:09:00 +0100 Subject: [PATCH] Move static `properties` section to properties.html --- docs/syntax/dynamic.html | 14 +- docs/syntax/properties.html | 399 +++++++++++++++++++++++++----------- docs/syntax/static.html | 354 ++------------------------------ 3 files changed, 302 insertions(+), 465 deletions(-) diff --git a/docs/syntax/dynamic.html b/docs/syntax/dynamic.html index 9205fd2..f01dfbc 100644 --- a/docs/syntax/dynamic.html +++ b/docs/syntax/dynamic.html @@ -1,8 +1,8 @@ -

Dynamic Items

+

Dynamic Items


-

The dynamic section adds new menu items to the context menu.

+

The optional dynamic section adds new menu items to the context menu.

-
Sub-items
+
Sub-items

The section can have the following entry types, all of which are optional:

While the var block should be at the top of the section, the other entries can appear in any order.

-
Example
+
Example

In the following example, one top-level item is created, that is separated with a horizontal line from an adjacent sub-menu, which in turn has one sub-Properties

Either a title or a image property is mandatory (set to a non-null value). For further details, - please refer to the properties section below.

+ please refer to the properties page.

Syntax
item( title = value [property = value [...] ])
@@ -80,7 +80,7 @@

Either a title or a image property is mandatory (set to a non-null value). For further details, - please refer to the properties section below.

+ please refer to the properties page.

menus can have the following entry types, all of which are @@ -118,7 +118,7 @@

Properties

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.

Syntax
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
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
PatternMatches any string that ...Would matchWould not match
'foo'contains the literal string foo anywhere.foo, foobar, afoobarfo, f oo, bar
'"foo"'contains the literal string foo as a whole word + only. + foo, foo/bar, some foo barfoobar, foofoo, bar
'*foo'ends with the literal string foo.foo, barfoo, bar/foofoobar, 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-fufoo, foobar, barfoo/bar
'!"foo"'does not contain the word + foofobar, kung fu bar, foobarfoo, kung foo bar, bar/foo/bar
'!*foo'does not contain a word ending on + foofoobar, fooo-fofoo, foo bar, bar/foo
'foo*!'does not contain a word stharting + wit + foomyFooBar, barFoofoo, foobar, fo-fooo
+


For dynamic items the following syntax allows to match against file + extensions:

+
PatternMatches any file extension ...Would matchWould not match
'.exe'equal to .exesetup.exe, notepad.exeinstall.bat, shell.nss, shell.ex_, + file + without an extension. +
'!.exe'not equal to .exesetup.exe.zip, video.mp4, shell.ex_, + file + without an extension. + setup.exe, shell.exe
'.exe|.dll'equal to either .exe or .dllshell.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.

+
+
For static items (optional)
+

Default = null, which means the title of the target + is + not changed.

+
For dynamic items (required)
+

It is mandatory for menu and item entries, unless a image property is defined.

+
+
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: - + - + - + @@ -291,43 +501,17 @@
HiddenThem menuitem will not be displayed.Hide the menuitem.
NormalEnabled the menuitem.Enable the menuitem.
DisableDisabled the menuitem.Disable the menuitem.
StaticDisplay 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)MISst, 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, IconMIst, 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 @@ -489,9 +669,7 @@ - - - + - - - - + @@ -514,9 +691,7 @@ - - - + - - - + - - - + - - - +
WindowIdi Controls how the window of the executed command is to be shown. Can be one of the following parameters: @@ -503,10 +681,9 @@
Directory (dir)I

Specifies the working directory to execute +

di

Specifies the working directory to + execute the command in.

Default = null
AdminIdi

Execute the command with administrative permissions.

Default = false @@ -525,9 +700,7 @@
VerbIdi Specifies the default operation for the selected file. Value type string and can have one of the following parameters:
@@ -575,9 +748,7 @@
WaitIdi

Wait for the command to complete.

@@ -587,9 +758,7 @@
CheckedIst, di Type of select option: @@ -611,9 +780,7 @@ - - - + - - - + - - - + - - - + - - - +
DefaultMIst, di

Specifies that the item is the default. A

ExpandedMdm

Move all immediate menuitems to the parent menu.

@@ -637,27 +802,23 @@
Column(col)MIdm, di

Create a new column.

Default = true
KeysMIst, dm, di

Show keyboard shortcuts.

Default = null
TipMIst, dm, di

Show a tooltip for the current menuor Static Items -
-

This section modifies context menu items added by the system or by a third party. more than one item can be added - with some properties to customize the context menu. explained below in more details.
The items must have the - property find. to search in the titles of the menu items to catches them and customize by other - properties such as changing the title, icon, visibility, or moving it to another location.

-

In the following example, it shows how to write add an items to static:

-
shell 
-{
-    static
-    {
-        item(find = 'copy'image = #00ff00)
-        item(find = 'paste' image = #0000ff)
-    }
-}
-
-
-

Properties

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
PropertySummary
WhereAllow menu item to be passed if a true value is returned
- Default = true -
FindAccept menuitem when the specific menuitem title is contains or equal to the current find property.
Use - this delimiter | to separate patterns. -

This property must be included with another property at least if where - property is not defined.

- Default = null -
-
Syntax
- find = 'undo' Find any word contains "undo"
- find = '"undo"' Match whole word only
- find = '*undo' Find a word that ends with
- find = 'undo*' Find a word that starts with
-
- find = '!undo' Find any word not contains "undo"
- find = '!"undo"' Search for any word not equal to "undo"
- find = '!*undo' Find a word that not ends with
- find = 'undo*!' Find a word that starts with
-
- find = 'undo delete|undo copy' Find an equal title for "undo delete" or "undo copy" -
In -

Determine the path of the menu being searched.

- Default = null -
Title -

Change value indicating the caption of the menuitem.

- Default = null -
ModeAccept item by selections behavior. Value have one of the following parameters: - - - - - - - - - - - - - - - - - - - - - -
noneAccept item when there are no selections.
SingleAccept menuitem when there are single selection.
multi_uniqueAccept when multiple selections are single type.
multi_singleAccept when multiple selections are single file extension.
multipleAccept all types.
- Default = multiple -
TypeSpecify the types of object files allowed for the menu item to appear. The property is assigned to one - or more of these parameters and this character | is used to separate types.
- Add a character ~ before single type to exclude. -

The property not supported syntax expressions.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
*Accept menuitem when any type are selected.
FileAccept menuitem when file are selected.
Dirctory(Dir)Accept menuitem when Dirctory are selected.
DriveDrive objects
USBAccept menuitem when USB flash drive are selected.
DVDThe drive is a DVD-ROM drive
FixedAccept menuitem when Fixed drive are selected. The drive has fixed media; for example, a - hard disk drive or flash drive. -
VHDAccept menuitem when Virtual Hard Disk are selected.
RemovableThe drive has removable media; for example, a floppy drive, thumb drive, or flash card - reader. -
RemoteThe drive is a remote (network) drive.
BackAccept menu item when the background of all types are selected or can specify of this types - for the background (back.directory, back.drive[back.fixed, back.usb, back.dvd, back.vhd, - back.Removable], back.namespace[back.computer, back.recyclebin]) -
DesktopAccept menuitem when the Desktop are selected.
NamespaceAccept menuitem when Namespace are selected. Can be virtual objects such as the My Network - Places and Recycle Bin. -
ComputerAccept menuitem when the My Computer are selected.
RecyclebinAccept menuitem when the Recycle bin are selected.
TaskbarAccept menuitem when the Taskbar are selected.
- Default = Accepts all types except for the taskbar. -

Required for menu, item, separator.

-
Visibility (vis)Visibility of menuitem and can have one of the following parameters:. - - - - - - - - - - - - - -
HiddenHide the menuitem.
NormalEnabled the menuitem.
DisableDisabled the menuitem.
- Default = normal -
Position (pos)The position at which a menuitem should be inserted into the menu.
Position can have one of the - following parameters: - - - - - - - - - - - - - - - - - - - - - -
AutoInsert the menuitem to the current position.
MiddleInsert the menuitem to the middle of the menu.
TopInsert the menuitem to the top of the menu.
BottomInsert the menuitem to the bottom of the menu.
Number setsInsert the menuitem to a specified position with integer numbers.
- Default = auto -
Separator (sep)Add separator with menuitem position by parameters: - - - - - - - - - - - - - - - - - -
NoneNot adding a separator with the menuitem.
Before, TopAdd a separator before the menuitem.
After, BottomAdd a separator after the menuitem.
BothAdd a separator before and after the menuitem.
- Default = none -
Image, IconThe 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 - - - - - - - - - - - - - - - - - - - - - -
NullShow menuitem without icon.
InheritInheriting the image from the parent.
GlyphAssign image as Glyph.
ColorAssign image as color.
PathAssign image from location path or resource icon.
- Default = null -
CheckedValue that indicates whether the menuitem checked type: - - - - - - - - - - - - - -
0Not checked
1Display as checked mark.
2Display as radio bullet.
- Default = 0 -

Required for item.

-
Parent, Menu

Move current menu item(s) to another menu.

- Default = null
Keys

Show keyboard shortcuts.

- Default = null
Tip -

Show a tip for the current item

- Default = null
- Syntax
-

-tip = "Lorem Ipsum is simply dummy text."
-tip = ["Lorem Ipsum is simply dummy text.", tip.info]
-tip = ["Lorem Ipsum is simply dummy text.", tip.info, 1.2]
-
-
Default -

Specifies that the menuitem is the default. A menu can contain only one default menuitem, which is - displayed in bold.

- Default = false -
-
+

Static Items

+
+

This section modifies context menu items added by the system or by a third party. more than one item can be added + with some properties to customize the context menu. explained below in more details.
The items must have the + property find. to search in the titles of the menu items to catches them and customize by other + properties such as changing the title, icon, visibility, or moving it to another location.

+

In the following example, it shows how to write add an items to static:

+
shell 
+{
+    static
+    {
+        item(find = 'copy'image = #00ff00)
+        item(find = 'paste' image = #0000ff)
+    }
+}