Using the Process Analyst > Process Analyst for Developers > Automation Model > ICommand.Pressed [Property][Get/Set]

ICommand.Pressed [Property][Get/Set]

Gets and Sets this command's Pressed state.

Defined As

Execution Result

If the property get succeeds, the return value will be Success. If the return variable is bad, the return value will be InvalidArgument.

Limits

Remarks

This is only useful for toggle buttons, indicating whether or not the button is in a pressed down state. The setting of this property is only valid for custom commands.

Calling Syntax

This example assumes there is a valid Command object as retrieved from a Process Analyst's CommandSystem. (for example, VBA: ProcessAnalyst.CommandSystem.Item(1))

[VBA]

Sub Example(Command As Object)
Dim pressed As Boolean
`Getting Property value
pressed = Command.Pressed
`Setting Property value
Command.Pressed = True
End Sub

[Cicode]

FUNCTION Example(OBJECT hCommand)
// Getting property value
INT Pressed = _ObjectGetProperty(hCommand, "Pressed");
// Setting property value
_ObjectSetProperty(hCommand, "Pressed", -1);
END