v5.0
ビルトインコマンドまたはカスタムコマンドをスクリプト名で検索します。
oReturn = XSIApplication.GetCommandByScriptingName( ScriptingName ); |
| パラメータ | タイプ | 詳細 |
|---|---|---|
| ScriptingName | String | 検索するコマンドのスクリプト名。 |
// JScript example that shows how to find a command by its scripting name
var oCmd = Application.GetCommandByScriptingName( "GetMarking" )
Application.LogMessage( "Command Name: \"" + oCmd.Name + "\", Command Scripting Name: \"" + oCmd.ScriptingName + "\"" ) ;
// Test if a command with a given scripting name exists
oCmd = Application.GetCommandByScriptingName( "CommandThatDoesNotExist" )
if ( oCmd == null )
{
Application.LogMessage( "Command \"CommandThatDoesNotExist\" is not installed" ) ;
}
//Expected output:
//INFO : Command Name: "Get Marked Parameters", Command Scripting Name: "GetMarking"
//INFO : Command "CommandThatDoesNotExist" is not installed
|
' VBScript example that shows how to find a command by its scripting name
set oCmd = Application.GetCommandByScriptingName( "GetMarking" )
Application.LogMessage( "Command Name: """ & oCmd.Name & """, Command Scripting Name: """ & oCmd.ScriptingName & """" )
' Test if a command with a given scripting name exists
set oCmd = Application.GetCommandByScriptingName( "CommandThatDoesNotExist" )
if typename( oCmd ) = "Nothing" then
Application.LogMessage( "Command ""CommandThatDoesNotExist"" is not installed" )
end if
'Expected output:
'INFO : Command Name: "Get Marked Parameters", Command Scripting Name: "GetMarking"
'INFO : Command "CommandThatDoesNotExist" is not installed
|