Executes the named command.
| Name | Description |
|---|---|
| ExecuteCommand(string) | Executes the named command. |
| ExecuteCommand(string, object) | Executes the named command and passes the specified argument. |
Application commands are typically associated with menuitems and toolbar buttons. See the List of Commands that can be executed in script.
This example confirms the 'ToggleKioskView' command is allowed (per the user's permissions) and available in the current application context,
and then executes the command. 'ToggleKioskView' is only available in Run Mode.
If this script is executed when the user is in Design Mode, a message dialog will be displayed; otherwise, the user will toggle Kiosk View
each time the script executes.
var cmdName = "ToggleKioskView"; if (WV.IsCommandPermitted(cmdName)) WV.ExecuteCommand(cmdName); else WV.MsgBox(cmdName + " is not currently available."); // Note: to force KioskView (instead of toggling), use: // WV.ExecuteCommand(cmdName, true);
