customization
Creates a command that runs a script. Note: The Command object, used in conjunction with XSIApplication.CreateCommand, provides a much more powerful API for specifying custom commands.
oString = CreateScriptCommand( CommandName, ScriptName, FileName, [ProcName], [Description] ); |
Returns a unique String identifier for the command.
Parameter | Type | Description |
---|---|---|
CommandName | String | Name displayed in the user interface (on toolbar buttons, in the Customize menu). |
ScriptName | String | Name used to run the command in scripting. |
FileName | String | Path and name of the script file. |
ProcName | String | Name of a scripting function or subroutine.
Default Value: Script runs from the start of the file |
Description | String | Description of the command. |
sub Install() dim file, toolbar, command, path path = Application.InstallationPath( siUserPath ) file = path & "\Data\Scripts\myUtils.vbs" 'Create Toolbar toolbar = CreateToolbar("Utilities") 'Create Commands command = CreateScriptCommand( "Simplify It" ,_ "makeSimple" ,_ file ,_ "MakeSimple",_ "Makes life easier." ) 'Add button to toolbar. CreateToolbarButton toolbar, command end sub |