The dynamic section adds new menu items to the context menu.
The section can have the following entry types, all of which are optional:
var block to
define "local" variables.
item entries. These
appear as top-level items in a context menu.
menu entries. These
appear as top-level sub-menus in a context menu.
separator
entries. These create a horizontal line between the given entries.
imports. The content of the given file will be placed in the position of the import.
While the var block should be at the top of the section, the other entries can appear in any order.
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-item
on its own:
shell
{
dynamic
{
item(title = 'Hello, World!')
separator
menu(title = 'sub menu' image = #0000ff)
{
item(title = 'test sub-item')
}
}
}
items create a single menu entry.
Only the title property is mandatory (set to a non-null value). Please refer to the properties section below for further
details.
item( title = value [property = value [...] ])
menu entries create a new sub-menu. They have properties and sub-entries.
Only the title property is mandatory (set to a non-null value). Please refer to the properties section below for further
details.
menus can have the following entry types, all of which are optional:
var block to
define "local" variables.
item entries.
menu entries.
separator
entries. These create a horizontal line between the given entries.
imports. The content of the given file will be placed in the position of the import.
menu( title = value [property = value [...] ])
{
[ item() [...] ]
[ menu(){} [...] ]
[ separator [...] ]
[ import 'path/to/import.nss' [...] ]
}
separators create a horizontal line.
separators do not have any mandatory properties. Please refer to the properties section below for further details.
separator
separator( property = value [property = value [...] ])
| Property | Summary | ||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Where | Allow menu item to be passed if a true value is returned Default = true |
||||||||||||||||||||||||||||||||
| Title | Sets a value indicating the caption of the menuitem. For menu and item entries, this property must be included with if no
Required for menu, item. |
||||||||||||||||||||||||||||||||
| Mode | Accept item by selections behavior. Value have one of the following parameters:
Required for menu, item, separator. |
||||||||||||||||||||||||||||||||
| Type | Specify 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.
Required for menu, item, separator. |
||||||||||||||||||||||||||||||||
| Visibility (vis) | Visibility of menuitem and can have one of the following parameters:
Required for menu, item, separator. |
||||||||||||||||||||||||||||||||
| Find |
Accept menuitem when the specified path name or path extension is contains or equal to the current
find property. 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) | Add separator with menuitem position by parameters:
Required for menu, item. |
||||||||||||||||||||||||||||||||
| Position (pos) | The position at which a menuitem should be inserted into the menu. Position can have one of the following parameters:
Required for menu, item, separator. |
||||||||||||||||||||||||||||||||
| Image, Icon | 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
Required for menu, item. |
||||||||||||||||||||||||||||||||
| Parent, Menu | Move current item to another menu. Default = null |
||||||||||||||||||||||||||||||||
| Command (cmd) | 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 = nullRequired for item. |
||||||||||||||||||||||||||||||||
| Arguments (arg, args) | The parameter to pass to the Command property of a menuitem. Default = nullRequired for item. |
||||||||||||||||||||||||||||||||
| Invoke | Set execution type
Required for item. |
||||||||||||||||||||||||||||||||
| Window | Controls how the window is to be shown. can be one of the following parameters:
Hidden, Show, Visible, Minimized, Maximized Default = showRequired for item. |
||||||||||||||||||||||||||||||||
| Directory (dir) | Specify the work directory to execute the command. Default = nullRequired for item. |
||||||||||||||||||||||||||||||||
| Admin | Execute the command with administrative permissions. Default = falseRequired for item. |
||||||||||||||||||||||||||||||||
| Verb | Specifies that the operation is the default for the selected file. value type string and can have one of
the following parameters:
Required for item. |
||||||||||||||||||||||||||||||||
| Wait |
Waiting Until end of command. Default = falseRequired for item. |
||||||||||||||||||||||||||||||||
| Checked | Value that indicates whether the menuitem checked type:
Required for item. |
||||||||||||||||||||||||||||||||
| Default |
Specifies that the menuitem is the default. A menu can contain only one default menuitem, which is displayed in bold. Default = falseRequired for item. |
||||||||||||||||||||||||||||||||
| Expanded |
Move items to the parent menu. Default = falseRequired for menu. |
||||||||||||||||||||||||||||||||
| Column(col) | Create a new column. Default = trueRequired for item, menu. | ||||||||||||||||||||||||||||||||
| Keys | Show keyboard shortcuts. Default = null |
||||||||||||||||||||||||||||||||
| Tip |
Show a tip for the current menu or item. Default = nullSyntax
|