SelectHandle

(Engine-Level Function)

Description: Returns a pointer to a handle of selected graphics statements at a location in a window.
Returns: Pointer
Usage: Script or steady state.
Function Groups: Graphics
Related to: DragHandle | SelectHandleNum
Format: SelectHandle(Object, X, Y, DragAll)
Parameters:  
Object
Required. Any expression for the object value which identifies the window.
X
Required. Any numeric expression for the x-axis coordinate of the selection point.
Y
Required. Any numeric expression for the y-axis coordinate of the selection point.
DragAll
Required. Any logical expression. If true, dragging a handle will drag all selected handles at (X,Y). Otherwise, only the first selected handle (in the topmost layer) will drag.

Example:

If LocSwitch() == 4 GetHandle;
[
  handle = SelectHandle(CurrentWindow(), XLoc(), YLoc(), 1);
  handle = PickValid(handle, 0);
]

This script will be executed when the left mouse button is pressed, and will attempt to grab a valid handle that lies directly under the mouse.