Command

Constructor of Command object as method of IScriptApplication

Command object constructor

  • BSTR strName
  • BSTR strTitle = "" (optional)
  • BSTR strPrompt = "" (optional)
  • long nImage = -1 (optional)
  • VARIANT onAction (optional)

Return Value

JavaScript

var ppCommandHandler = new Command(strName, strTitle, strPrompt, nImage, onAction);

Visual Basic Script

ppCommandHandler = ScriptApplication.Command strName, strTitle, strPrompt, nImage, onAction

C++

CComPtr<IScriptCommandHandler> pCommandHandler;
HRESULT hr = ScriptApplication.Command(strName, strTitle, strPrompt, nImage, onAction, &pCommandHandler);