Description
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.
Scripting Syntax
CreateScriptCommand( CommandName, ScriptName, FileName, [ProcName], [Description] )
Parameters
|
Parameter |
Type |
Description |
|
CommandName |
Name displayed in the user interface (on toolbar buttons, in the Customize menu). |
|
|
ScriptName |
Name used to run the command in scripting. |
|
|
FileName |
Path and name of the script file. |
|
|
ProcName |
Name of a scripting function or subroutine. Default Value: Script runs from the start of the file |
|
|
Description |
Description of the command. |
Return Value
Returns a unique String identifier for the command.
Examples
VBScript Example
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
See Also
|
|
|
|
SOFTIMAGE|XSI v6.01