This topic shows the syntax of script calls for menus, toolbars and keyboard/mouse shortcuts. It applies on script without parameters, and on scripts with a single string parameter.
Scripts with more than one parameter, or with one parameter that is not a string parameter, cannot be called from menus, toolbars and keys/mouse.
Typical entries - without parameters
These are suitable to call scripts without any parameter.
Menu
<l:ShellMenuItem Header="Go to Overset Point" CommandParameter="CursorAtOverset"/>
Toolbar
<l:TBBtn CommandParameter="EditFontStylePrintOnly" ToolTip="Print only - SHIFT+CTRL+P" Icon="#p.gif"/>
Keyboard/mouse
<KeyBinding CommandType="Script" CommandParameter="ToggleShow" Modifiers="ALT" Key="F9"/>
Typical entries - with parameters
These are suitable to call scripts with one string parameter, but cannot be used for scripts that require more than one parameter.
Menu
<l:ShellMenuItem Header="Get 1" CommandParameter="GetSaveGet" Parameters="1"/>
Toolbar
<l:TBBtn CommandParameter="ExecuteWorkflowOnObjects" ToolTip="Publish to News" Icon="#nu14.gif" Param="wf=publish&Pars=DestPath:/GNWeb/News;prompt:false;promptMode:true;" />
Keyboard/mouse
<KeyBinding CommandType="ParametersScript" CommandParameter="ObjMove" Param="D,W" Modifiers="CTRL" Key="Down"/>
Notes
•In menus and toolbars calls, the only difference between calls of scripts without parameters and with parameters is the presence of the Parameters="" statement.
•In keyboard/mouse calls, there are two differences between calls of scripts without parameters and with parameters: CommandType="Script" or "ParametersScript"; in the latter case, there's a Param="" statement.