[<<Previous Entry]
[^^Up^^]
[Next Entry>>]
[Menu]
[About The Guide]
FUNCTION RAT_EVENT() *changed*
Short:
------
RAT_EVENT() Event handler - inkey() with mouse awareness
Returns:
--------
<nEvent> => Event value - either inkey() value or
mouse value
Syntax:
-------
RAT_EVENT([nTimeout],[lClearkb])
Description:
------------
Event handler - inkey() with mouse awareness
<nTimeout> is the # seconds to wait before
timeout. Zero (0) means indefinately . If you don't pass
anything, default is 0. Slight difference from inkey() there.
Returns values are:
If keystroke inkey() value
If left mouse button has been depressed 400
If right mouse button has been depressed 500
If timeout 0
[lClearkb] optional clear keyboard True (default)
or False. If a keystroke is gotten, and this is True, clear the
keyboard with:
while inkey()#0
end
Examples:
---------
e := 0
while e#27
e := rat_event(30)
do case
case e == 0
? "Timed out after 30 seconds"
case e < 400
? "Key press with inkey() value of :",e
case e == 400
? "Left mouse button pressed at :"
?? "row-> ",rat_eqmrow(), "col-> ",rat_eqmcol()
case e == 500
? "Right mouse button pressed at :"
?? "row-> ",rat_eqmrow(), "col-> ",rat_eqmcol()
endcase
end
Source:
-------
S_MOOSE.PRG
This page created by ng2html v1.05, the Norton guide to HTML conversion utility.
Written by Dave Pearson