grread
(grread [flag] [cursor])
The grread function lets you read the next user input directly.
Arguments
flag controls the input mode. The way the function is applied and performed is specified by control bits that have the following meaning:
Flag |
Meaning |
1 |
Dragmode: As the cursor is moved, the coordinates are tracked permanently. |
2 |
Any single input is terminated immediately and returned. |
4 |
Specifies a cursor type in the argument type (see below). |
8 |
Suppresses displaying ***Cancel*** in the Command Window if Esc has been pressed by the user. |
cursor sets the cursor type used by the function:
Value |
Meaning |
0 |
Standard cursor |
1 |
No cursor |
2 |
Selection Box |
Return Value
The function returns a list.
The first element of the list specifies the kind of input device used. The second element is the content of the input, dependent on the kind of input stored, as documented in the following table:
First Element |
Second Element |
2 - Keyboard input |
String containing the keyboard input |
3 - Point input |
Point coordinates (picked point) |
5 - Drag point |
Point coordinates (drag point) |
: (grread)
(3 (2687.00 2036.50 0.00)) ; User picked a point
: (grread 2)
A(2 65) ; User entered A
: (grread 4 2) ; Cursor = Select Box
(2 "") ; User entered Return