of_clickItem

Description

Causes an item to be clicked programmatically, without user intervention.

Syntax

of_clickItem(Long item)
of_clickItem(String item)

of_clickItem(Long group, Long item)
of_clickItem(String group, String item)

Parameter(s)

Name Description
group The text or index for the group to be clicked. The text of the group is the text the programmer gave when of_addGroup was called or when of_setText was last called. The index of the group is the same as the value returned when of_addGroup was called. This parameter is optional and has no default value.
item The text or index for the item to be clicked. The text of the item is the text the programmer gave when of_addGroup, of_addLabel or of_addLink was called or when of_setText was last called for the item. The index of the item is the same as the value returned when of_addGroup, of_addLabel or of_addLink was called.

Return Value

Returns a long indicating the result of the call, ALLOW (1) if the call succeeded or PREVENT (-1) if there was an error.

Usage

Use this method when you want to execute the script associated with an item without user intervention.

In order to use this method, the group and item must both be enabled and visible. If it is not, an error message is displayed and PREVENT is returned.

If you have multiple groups or items using the same text and call the method using the text of the group or item, the first one found of each in the XPListBar will be used in the "click".

If the group parameter is included, then the item indicated should be a label or a link.

Examples

of_clickItem('Enable', 'Paste')

See Also

Last edited Sep 24, 2016 at 4:55 PM by cjharris02892, version 6