HP Forums
Problem: Repeat-Until with GETKEY und MOUSE - 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: Problem: Repeat-Until with GETKEY und MOUSE (/thread-11684.html)



Problem: Repeat-Until with GETKEY und MOUSE - Onieh - 10-27-2018 04:27 PM

Hello, everybody,
with the numbers 1-7 I want to jump to another program. With END (MOUSE) I would like to leave the selection menu. What must the program look like?
Here is my current program.

Best Regards Heino

EXPORT Auswahlmenu()

BEGIN
LOCAL K:=0,Z1:=0;
LOCAL m,m1,mx,my;

RECT_P(0,0,320,220,RGB(19,255,255));

TEXTOUT_P("A u s w a h l m e n u",70,10,6);

RECT_P(0,40,339,41,RGB(0,0,0));
TEXTOUT_P("1: Bewehrung",70,50,4);
TEXTOUT_P("2: Biegewiderstand",70,70,4);
TEXTOUT_P("3: Einfeldträger (Gleich)",70,90,4);
TEXTOUT_P("4: Einfeldträger (variabel)",70,110,4);
TEXTOUT_P("5: Langfristige Durchbiegung",70,130,4);
TEXTOUT_P("6: Zulässige Querkraft",70,150,4);
TEXTOUT_P("7: FREI ",70,170,4);

DRAWMENU("ENDE","","","","","");

//WHILE MOUSE(1)>=0 DO END;

REPEAT
//m:=MOUSE;
//UNTIL SIZE(m1)>0;
//m1:=m(1);

K:=GETKEY;

UNTIL K==42 or K==43 or K==44 or K==37 or K==38 or K==39 or K==32;

//mx:=m1(1);
//my:=m1(2);

IF K==42 THEN //Taste 1
Bewwahl;
END;

IF K==43 THEN //Taste 2
Biegewiderstand;
END;

IF K==44 THEN //Taste 3
Einfeldmenu;
END;

IF K==37 THEN //Taste 4
Einfeldvar;
END;

IF K==38 THEN //Taste 5
LangfristigeDurchbiegung;
END;

IF K==39 THEN //Taste 6
zulQuerkraft;
END;

IF K==32 THEN //Taste 7

END;

// IF(my≥220 AND my≤319) AND (mx≥0 AND mx≤51) THEN
// Startview(-1);
//END;
//FREEZE;
END;