You can use the xcoord and ycoord functions to find and use the coordinates of the position of the selection that stimulated the current response. If the object that stimulated the current response is a graphical object, ESL returns the following values:
Function |
Value Returned |
xcoord |
The X coordinate of the point selected, in the coordinate system of the selected object. |
ycoord |
The Y coordinate of the point selected, in the coordinate system of the selected object. |
In the following example, a graphical region called PlotArea is displayed. The user can select PlotArea and a tick mark will be displayed where the user selected. The user can create a scatter graph, showing exactly where the tick marks are to be placed. This technique is most useful if the selecting device is the mouse, which makes very precise pointing possible.
response to PlotArea
add to PlotArea
move to xcoord ycoord
pattern TickMark
If the object that stimulated the current response is a textual region, ESL returns values as follows:
Function |
Value Returned |
xcoord |
The column number of the point selected. |
ycoord |
The line number of the point selected. |
Note that there is not necessarily any character at the point
selected. The selection might be to the right of the last character in the line, or below the last occupied line.
If the current response is not stimulated by selecting an object, using the response to response definition, ESL returns values of zero for the xcoord and ycoord functions.