XSIApplication.GetCommandByScriptingName

導入

v5.0

詳細

ビルトインコマンドまたはカスタムコマンドをスクリプト名で検索します。

C#構文

Command XSIApplication.GetCommandByScriptingName( String in_strScriptingName );

スクリプト構文

oReturn = XSIApplication.GetCommandByScriptingName( ScriptingName );

戻り値

Command

パラメータ

パラメータ タイプ 説明
ScriptingName String 検索するコマンドのスクリプト名。

1. JScript の例

// 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

2. VBScript の例

' 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

関連項目

Command.ScriptingName CommandCollection.Item