Comments on: SP_RAT_READ https://vivaclipper.wordpress.com/2013/11/18/sp_rat_read/ Notes of a Clipper Language Student Wed, 11 Dec 2013 23:59:33 +0000 hourly 1 http://wordpress.com/ By: SP Mouse Functions | Viva Clipper ! https://vivaclipper.wordpress.com/2013/11/18/sp_rat_read/#comment-5396 Wed, 11 Dec 2013 23:59:33 +0000 http://vivaclipper.wordpress.com/?p=6454#comment-5396 […] RAT_LASTEV() Returns the last event recorded by RAT_EVENT() RAT_MENU2() Mouseable MENU TO emulation RAT_READ() Mouseable […]

]]>
By: SP Get system Functions | Viva Clipper ! https://vivaclipper.wordpress.com/2013/11/18/sp_rat_read/#comment-5266 Sun, 08 Dec 2013 20:46:02 +0000 http://vivaclipper.wordpress.com/?p=6454#comment-5266 […] in a VALID condition for a GET CALCVALID() Uses GETCALC() calculator function as a GET VALID clause RAT_READ() Mouseable read GENVAL() Generic VALID clause validation with message GENREADER() Creates […]

]]>
By: SP_R_ISRATREAD | Viva Clipper ! https://vivaclipper.wordpress.com/2013/11/18/sp_rat_read/#comment-4755 Tue, 19 Nov 2013 18:09:12 +0000 http://vivaclipper.wordpress.com/?p=6454#comment-4755 […] Examples: ——— IF R_ISRATREAD() … ENDIF Notes: ——- Source: ——- S_RREAD.PRGSee also : RAT_READ(), […]

]]>
By: Viva Clipper ! https://vivaclipper.wordpress.com/2013/11/18/sp_rat_read/#comment-4754 Tue, 19 Nov 2013 17:56:17 +0000 http://vivaclipper.wordpress.com/?p=6454#comment-4754 […] RRJUMP2() Short: —— RRJUMP2() Jump to a new get in a RAT_READ() Returns: ——– NIL Syntax: ——- RRJUMP2(nNew) Description: ———— While in a RAT_READ(), causes the jump flag to be set to <nNew>, and and the current get's exitstate variable to be set to GE_ENTER. This causes an exit from the current get, and a jump to get <nNew>. Examples: ——— // in this example, pressing or clicking F3 causes a jump to // get # 1, while pressing or clicking F4 causes a jump to // get # 5. #include "inkey.ch" v1 := space(10) v2 := space(10) v3 := space(10) v4 := space(10) v5 := space(10) setkey(K_F4,{||rrjump2(5)} ) setkey(K_F3,{||rrjump2(1)} ) @24,0 say "[F3-Go to First Get] [F4-Go to Last Get]" ahot := {{24,0,24,20,K_F3},{24,23,24,41,K_F4} } @10,10 get v1 @11,10 get v2 @12,10 get v3 @13,10 get v4 @14,10 get v5 RAT_READ(getlist,1,.T.,27,nil,aHot) Notes: ——- Source: ——- S_RREAD.PRG See also : RAT_READ() […]

]]>
By: SP Functions | Viva Clipper ! https://vivaclipper.wordpress.com/2013/11/18/sp_rat_read/#comment-4744 Tue, 19 Nov 2013 11:37:27 +0000 http://vivaclipper.wordpress.com/?p=6454#comment-4744 […] Returns the last event recorded by RAT_EVENT() RAT_MENU2() Mouseable MENU TO emulation RAT_READ() Mouseable […]

]]>
By: SP_RAT_MENU2 | Viva Clipper ! https://vivaclipper.wordpress.com/2013/11/18/sp_rat_read/#comment-4724 Tue, 19 Nov 2013 01:02:20 +0000 http://vivaclipper.wordpress.com/?p=6454#comment-4724 […] RAT_MENU2() Short: —— RAT_MENU2() Mouseable MENU TO emulation Returns: ——– <nSelected> => selected menu option, 0 for none Syntax: ——- RAT_MENU2(aOptions,[nStart],[lImmediate],[bMouse]) Description: ———— You must pass an array of arrays, with each element being an array in the form {nRow,nColumn,cPrompt} which correspond to [ @nRow,nCol PROMPT cPrompt. ] [nStart] is an optional starting prompt, with the default being 1 [lImmediate] refers to the action taken when a first letter or a mouse click changes options. The default is to have immediate action – select and return. By passing False, it becomes a 2 step process, requiring click-click or firstletter-firstletter to select and return. [bMouse] is an optional codeblock for mouse clicks. If the mouse click does not satisfy RAT_MENU2(), and there is a [bMouse] codeblock, it will be evaluated as follows: eval(bMouse,mouserow, mousecol) Examples: ——— local aOptions := { ; {23,2 , 'Add'},; {23,9 , 'Open'},; {23,17 , 'Delete'},; {23,27 , 'Change Date'},; {23,42 , 'Output list'},; {23,57 , 'Purge '},; {23,74 , 'Quit'}} nSelected := RAT_MENU2(aOptions,4,.f.,{|r,c| checkmouse(r,c) }) Source: ——- S_RMENU2.PRG See Also : INKEY(), RAT_ELBHD(), RAT_EQMCOL(), RAT_EQMROW(), RAT_ERBHD(), RAT_EVENT(), RAT_ISMOUSE(), RAT_LASTEV(), RAT_MENU2(), RAT_READ() See Also : RAT_ELBHD(), RAT_EQMCOL(), RAT_EQMROW(), RAT_ERBHD(), RAT_EVENT(), RAT_ISMOUSE(), RAT_LASTEV(), RAT_READ() […]

]]>
By: SP_RAT_LASTEV | Viva Clipper ! https://vivaclipper.wordpress.com/2013/11/18/sp_rat_read/#comment-4716 Tue, 19 Nov 2013 01:00:58 +0000 http://vivaclipper.wordpress.com/?p=6454#comment-4716 […] RAT_LASTEV() Short: —— RAT_LASTEV() Returns the last event recorded by RAT_EVENT() Returns: ——– <nEvent> => last recorded RAT_EVENT() event Syntax: ——- RAT_LASTEV() Description: ———— Every once in a while, some other function will be responsible for doing the RAT_EVENT() call, but your function still wants to know what the last event was. This function can be used to retrieve that value. Examples: ——— RAT_LASTEV() Source: ——- S_MOOSE.PRG See Also : RAT_ELBHD(), RAT_EQMCOL(), RAT_EQMROW(), RAT_ERBHD(), RAT_EVENT(), RAT_ISMOUSE(), RAT_MENU2(), RAT_READ() […]

]]>
By: SP_RAT_ISMOUSE | Viva Clipper ! https://vivaclipper.wordpress.com/2013/11/18/sp_rat_read/#comment-4708 Tue, 19 Nov 2013 00:58:53 +0000 http://vivaclipper.wordpress.com/?p=6454#comment-4708 […] RAT_ISMOUSE() Short: —— RAT_ISMOUSE() Determines mouse usage by RAT_EVENT() Returns: ——– <lIsMouse> => is there a mouse Syntax: ——- RAT_ISMOUSE([lIsMouse]) Description: ———— Determines mouse usage by RAT_EVENT(). Default is determined by a call to the ASM function RAT_EXIST(). However, you may want to shut down mouse usage even if a mouse is present. If so, call this function with False, to override. [lIsMouse] S_MOOSE.PRG contains a static variable called 'lIsMouse'. This is determined initially by a call to RAT_EXIST(), but may be overridden by calling RAT_ISMOUSE(.f.). Examples: ——— RAT_ISMOUSE(.f.). Source: ——- S_MOOSE.PRG See Also : RAT_ELBHD(), RAT_EQMCOL(), RAT_EQMROW(), RAT_ERBHD(), RAT_EVENT(), RAT_LASTEV(), RAT_MENU2(), RAT_READ() […]

]]>
By: SP_RAT_EVENT | Viva Clipper ! https://vivaclipper.wordpress.com/2013/11/18/sp_rat_read/#comment-4700 Tue, 19 Nov 2013 00:57:00 +0000 http://vivaclipper.wordpress.com/?p=6454#comment-4700 […] RAT_EVENT() 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 K_MOUSELEFT 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 See Also : INKEY(), RAT_ELBHD(), RAT_EQMCOL(), RAT_EQMROW(), RAT_ERBHD(), RAT_EVENT(), RAT_ISMOUSE(), RAT_LASTEV(), RAT_MENU2(), RAT_READ() See Also : INKEY(), RAT_ELBHD(), RAT_EQMCOL(), RAT_EQMROW(), RAT_ERBHD(), RAT_ISMOUSE(), RAT_LASTEV(), RAT_MENU2(), RAT_READ() […]

]]>
By: SP_RAT_ERBHD | Viva Clipper ! https://vivaclipper.wordpress.com/2013/11/18/sp_rat_read/#comment-4689 Tue, 19 Nov 2013 00:54:17 +0000 http://vivaclipper.wordpress.com/?p=6454#comment-4689 […] RAT_ERBHD() Short: —— RAT_ERBHD() Determines if right mouse button is held down Returns: ——– <lHeldDown> => is RMB held down Syntax: ——- RAT_ERBHD([nSeconds]) Description: ———— Determines if right mouse button is held down by calling the ASM function RAT_RBHD() for [nSeconds]. Default for [nSeconds] is .1 seconds. If the right mouse button is held down during that time frame, True is returned, else False is returned. [nSeconds] is optional seconds to test for. Default is .1 seconds. This is different from the .ASM function RAT_RBHD(). RAT_ERBHD(<n>) watches the mouse for <n> seconds, and if the mouse remains depressed for the full time, then it is considered to be HELD DOWN. RAT_RBHD() on the other hand, only checks for the mouse button being depressed RIGHT NOW. RAT_ERBHD() calls RAT_RBHD() repetitively. Examples: ——— if rat_erbhd() ?"While you were out:" ?"Right button was depressed and held down at" ??rat_eqmrow(),rat_eqmcol() endif Source: ——- S_MOOSE.PRG See Also : RAT_ELBHD(), RAT_EQMCOL(), RAT_EQMROW(), , RAT_EVENT(), RAT_ISMOUSE(), RAT_LASTEV(), RAT_MENU2(), RAT_READ() […]

]]>