HP Forums

Full Version: Using the 6 soft keys.
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
This may be of interest to some of you.

EXPORT Get_Mouse()
BEGIN
RECT();//Clear the screen
TEXTOUT_P("Now go out there and do something BIG!",14,90);
TEXTOUT_P("Make your uncle Voober proud.",46,130);
DRAWMENU("Do","not","try","this","at","home.");
WAIT(2);//Wait for the 'Run' touch to be over with
LOCAL mouselist;
WHILE MOUSE(1)<#DD:-16h DO END;//Wait until the screen is touched somewhere in the verticle region of the soft keys
mouselist:=MOUSE();
PRINT();

CASE
IF MOUSE(0)<=#33:-16h THEN PRINT("You touched the 'Do' soft key.");END;//Do something
IF MOUSE(0)>=#35:-16h AND MOUSE(0)<=#68:-16h THEN PRINT("You touched the 'not' soft key.");END;//Do this
IF MOUSE(0)>=#6A:-16h AND MOUSE(0)<=#9D:-16h THEN PRINT("You touched the 'try' soft key.");END;//Do that
IF MOUSE(0)>=#9F:-16h AND MOUSE(0)<=#D2:-16h THEN PRINT("You touched the 'this' soft key.");END;//Do the other thing
IF MOUSE(0)>=#D4:-16h AND MOUSE(0)<=#107:-16h THEN PRINT("You touched the 'at' soft key.");END;//Do it because you like it
IF MOUSE(0)>=#109:-16h THEN PRINT("You touched the 'home.' soft key.");END;//Do not do this if you are not certain
END;//End CASE

PRINT("");
PRINT("Screen touched at horizontal coordinate "+MOUSE(0));
PRINT("");
PRINT("Screen touched at vertical coordinate "+MOUSE(1));
PRINT("");
PRINT("MOUSE() list is");
PRINT(mouselist);
END;
Reference URL's