| Command group | Flag affected | Reversible | Execute on client | Platform(s) |
| Events | NO | NO | NO | All |
| Shift | If specified,the queued event behaves as if the shift key has been pressed |
| Command/Ctrl | If specified,the queued event behaves as if the command/ctrl key has been pressed |
This command queues a "mouse click" event on a specified field, that is, it simulates a user-generated mouse click/drag operation on a field. You must specify the name of the field as a parameter, including the click positions within the field (that is, Start Row, Finish Row for lists and Start Character, Finish Character for text field selection). The specified field will get the focus.
There are options for including up to three modifier keys (that is, Shift, Ctrl/Cmnd) along with the click.
The field name parameter must be the name of a window field, not the name of the method associated with the field or the data name ($name, not $dataname). As an alternative to a simple name string, you can supply a notation string such as $cinst.$objs.name or even $cinst.$toolbars.toolbar.$objs.name where in the latter case the object is a toolbar control in the window toolbar that can accept the focus e.g. a combo box.
If the specified field is a pushbutton it is activated and an evClick event is generated as if the user had clicked on the button.
If the specified field is a check box or set of radio buttons, the check box field or group of radio buttons is checked/unchecked accordingly, and an evClick event is generated. Methods behind radio buttons and check boxes run as if the user had clicked on the window fields.
If the specified field is a radio group, you identify the member of the group that is to receive the click by setting the selection-range parameter to the value of $dataname that corresponds to the member. When the command executes, Omnis checks the member and generates an evClick event. Event methods for the radio group run as if the user had clicked on the field.
You can specify a range of characters. For example, the parameter field-name (2,5), highlights the characters within cursor positions 2 to 5 (that is, characters 3 to 5). Note that cursor position 0 is to the left of character 1, and cursor position 1 is to the right of character 1 (or to the left of character 2).
If Shift is selected and 5 is passed as the selection point, all characters between the current cursor position and cursor position 5 will be highlighted.
As the Queue click examples for Edit show, the two parameters act as a "click on, drag to" key operation.
If the specified field is a window list box or grid, the range is interpreted as a range of list lines. For example, the parameter list-field-name (2,5), selects the lines 2 to 5 (if $multipleselect for the list field is set), and the current line will be set to 2. An evClick event is generated after the specified lines have been selected.
# Queue click for edit fields
# highlight characters 3 to 7Queue clickmyEntryField (7,2)
# highlight characters 6 to 9Queue clickmyEntryField (5,9)
# assuming the current cursor is at position 15,# characters 9 to 15 are highlightedQueue click(Shift)myEntryField (8)
# assuming the current cursor is at position 15,# characters 16 to 22 are highlightedQueue click(Shift)myEntryField (22)
# assuming the current cursor is at position 15,# characters 10 to 15 are highlightedQueue click(Shift)myEntryField (7,9)
# assuming the current cursor is at position 15,# characters 8 to 15 are highlightedQueue click(Shift)myEntryField (9,7)
# Queue click for lists
# lines 7 to 3 are selected and the current line set to 7Queue clickmyListField (7,3)
# lines 2 to 9 are selected and the current line set to 2Queue clickmyListField (2,9)
# the current line to line 12 are selected; the current line does not changeQueue click(Shift)myListField (12)
# line 13 is selected and any lines currently selected remain selected; the current line does not changeQueue click(Shift,Command/Ctrl)myListField (13)
# lines 4 to 8 are selected and any lines currently selected remain selected; the current line does not changeQueue click(Shift,Command/Ctrl)myListField (4,8)