Efficient Use of Using both GETKEY and Soft Keys - Printable Version +- HP Forums (https://www.hpmuseum.org/forum) +-- Forum: HP Calculators (and very old HP Computers) (/forum-3.html) +--- Forum: HP Prime (/forum-5.html) +--- Thread: Efficient Use of Using both GETKEY and Soft Keys (/thread-11192.html) |
Efficient Use of Using both GETKEY and Soft Keys - Eddie W. Shore - 08-09-2018 07:59 PM Is there an efficient way to use both GETKEY and DRAWMENU in a program? I recurved a request that wants me to recreate a program in the style of the HP 48 (particularly FIF) on the Prime, but just like the 48. Any help would be appreciated. Thanks. RE: Efficient Use of Using both GETKEY and Soft Keys - cyrille de brébisson - 08-10-2018 06:26 AM Hello, DrawMenu will probably need to be used in conjunction with Wait and Mouse... wait(-1) will return after either 60seconds, OR a key or a mouse event. It will also be waiting in low power mode, thus saving power. See wait help for more info. Cyrille RE: Efficient Use of Using both GETKEY and Soft Keys - Eddie W. Shore - 08-12-2018 01:55 AM The following code works well for consecutive key presses, but it errors out after the first mouse click: Code:
RE: Efficient Use of Using both GETKEY and Soft Keys - Tyann - 08-12-2018 06:12 AM Bonjour WAIT(-1) renvoie une liste si vous touchez l'écran et une valeur numérique si vous appuyez sur une touche. Pour éviter de déclencher une erreur il faut faire un test avec TYPE avant de traiter les réponses. Hello WAIT (-1) returns a list if you touch the screen and a numeric value if you press a key. To avoid triggering an error, you must do a test with TYPE before processing answers. RE: Efficient Use of Using both GETKEY and Soft Keys - Eddie W. Shore - 08-12-2018 06:42 PM Tyann, thank you so much, the program works a lot better! Here is a new revised TEST5793. Key clicks return getkey numbers, mouse clicks return x and y pixel information. Only clicks are accepted, drags and holds are not acknowledged. Code:
|