HP Prime MOUSE command



#2

Hi,



I'm learning the using of MOUSE() command but I can´t get to understand how it really works. I wrote a little program that change the color of the screen depending the position of the pointer, but I have the following questions:

1.- How can I stop the loop until the next touch of the screen? I tried with BREAK and WAIT with no succes.

2.- What is the difference between the 0 and 1 value of MOUSE(4).

3.- Is there another alternative to wait for the touch of the screen whitout using a loop?



My goal is just to create a button to execute one action.



Sorry if my questions are too trivial.



EXPORT TOUCH()

BEGIN LOCAL xi,ni;

WHILE ni:=1 DO

ni:=B->R(MOUSE(4));

RECT();

xi:=B->R(MOUSE(0));

IF xi<160 THEN

RECT_P(0,0,160,240,#000000,#0000BB)

ELSE

RECT_P(160,0,320,240,#000000,#FF0000)

END;

END;

END;

END;


#3

1. Currently, no way. Most likely will be something like WAIT(-1) to also stop on mouse presses.

2. 1 should indicate (I believe) that you have a completed touch event (eg - finger down then up) with no additional drags, movements, etc.

3. Not at the moment.

TW

Edited: 14 Oct 2013, 10:33 a.m.

#4

hello,

MOUSE(4) is an integer 0..5 which descibes the type of detected mouse gesture:
New=0
Completed=1
Drag=2
Stretch=3
Rotate=4
LongClick=5

in most cases, with the MOUSE command, you will get a 0 or 2..


cyrille


#5

Quote:
hello,

MOUSE(4) is an integer 0..5 which descibes the type of detected mouse gesture:
New=0
Completed=1
Drag=2
Stretch=3
Rotate=4
LongClick=5

in most cases, with the MOUSE command, you will get a 0 or 2..

cyrille



Cyrille,

Can you clarify whether MOUSE works with a mouse buffer? If so, how is it flushed? Does calling MOUSE() immediately pop a mouse event?


Possibly Related Threads...
Thread Author Replies Views Last Post
  [HP-Prime CAS] "Warning, ^ (Command) Is ambiguous on non square matrices"?? CompSystems 1 715 12-07-2013, 07:15 PM
Last Post: CompSystems
  HP Prime - most favorite command bluesun08 2 596 11-12-2013, 11:29 AM
Last Post: bluesun08
  hp prime - command syntax bluesun08 6 909 11-10-2013, 11:57 AM
Last Post: bluesun08
  HP PRIME: command to read the SERIAL ? Joseph Ec 9 1,999 11-01-2013, 12:43 AM
Last Post: Joe Horn
  Connectivty Kit for HP Prime needs an "Import Program" Command Eddie W. Shore 3 682 10-23-2013, 03:37 PM
Last Post: Eddie W. Shore
  [HP-Prime] randPoly command CompSystems 0 337 09-26-2013, 08:49 AM
Last Post: CompSystems
  [HP-Prime xCAS] BUG: string command =( CompSystems 6 723 09-10-2013, 06:38 PM
Last Post: CompSystems
  [HP_Prime] definition of functions, APPLY command and BUGs CompSystems 1 438 09-05-2013, 03:59 PM
Last Post: CompSystems
  [HP-Prime] Request: New command for CAS (EvalStep) CompSystems 4 607 09-04-2013, 09:33 AM
Last Post: Eddie W. Shore
  SVN command to get latest realbuild Barry Mead 3 546 07-19-2013, 12:59 PM
Last Post: Didier Lachieze

Forum Jump: