Command.GetFlag

Description

Returns the state of one of the various flags that affects command behavior. You can set the value of a flag with Command.SetFlag.

Note: You can get the values of flags as properties. The list of those properties can be found in the See Also section.

Scripting Syntax

oBoolean = Command.GetFlag( Flag );

Return Value

Boolean indicating whether or not the requested flag is enabled

Parameters

Parameter Type Description
Flag siCommandCapabilities Flag to retrieve.

Examples

JScript Example

/*
        See if a command supports key assignment.
*/
var oCmd = Commands.Item("Apply Operator");
if ( true == oCmd.GetFlag(siSupportsKeyAssignment) )
{
        LogMessage(oCmd.Name + " supports key assignment.");
}
else
{
        LogMessage(oCmd.Name + " does not support key assignment.");
}

See Also

Command.CannotBeUsedInBatch Command.IsNotLogged Command.SupportsKeyAssignment