Menus syntax

Build 1501 on 14/Nov/2017  This topic last edited on: 1/Feb/2017, at 09:15

Typical menu entries - without parameters

<l:ShellMenuItem Header="labelname" CommandParameter="scriptname"/>

This is suitable to call scripts without any parameter, but cannot be used for scripts that receive parameters.

labelname: Enter what you want in the labelname - that's the name that will appear in the menu. Make sure the name is unique within its menu - software does not control it.

scriptname: Enter the name of the appropriate script you want to be run when a user click that menu command.
Note: you need to know the names of scripts. Names are not case-sensitive. If you specify a non existing script name, the menu command will appear as dimmed.

Typical menu entries - with parameters

<l:ShellMenuItem Header="labelname" CommandParameter="scriptname" Parameters="paramvalue"/>

paramvalue: Enter the value of the script parameter.

Note: here qualify only the scripts with only one string type parameter.

Scripts with more than one parameter, or scripts with non-string parameters cannot be called in this way. In such case, convert the script to use a string parameter, or in case you need more parameters, pass a comma delimited string and then parse it within the script.

Nested menu

<l:ShellMenuItem Header="nested_menu_name"/>

See also

If a modified menu command / shortcut key do not function