home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #27 / NN_1992_27.iso / spool / comp / sys / hp48 / 5786 < prev    next >
Encoding:
Internet Message Format  |  1992-11-17  |  2.2 KB

  1. Path: sparky!uunet!mcsun!Germany.EU.net!news.Hamburg.Germany.EU.net!mwhh!dmhh.hanse.de!detlef
  2. From: detlef@dmhh.hanse.de (Detlef Mueller)
  3. Newsgroups: comp.sys.hp48
  4. Subject: Re: Emulating a keypress in sys_RPL???
  5. Distribution: world
  6. Message-ID: <721942676detlef.detlef@dmhh.hanse.de>
  7. Sender: detlef@dmhh.hanse.de
  8. Date: Mon, 16 Nov 92 19:37:56 GMT
  9. References: <1992Nov16.090229.12183@waikato.ac.nz>
  10. Lines: 54
  11.  
  12. In article <1992Nov16.090229.12183@waikato.ac.nz> fee@waikato.ac.nz writes:
  13.  
  14. >How do I emulate a key-press in sys_RPL?
  15. >
  16. >That is, if I have a keycode in level 2 and a key plane in level 1,
  17.  
  18. As BINTs ?!
  19.  
  20. >giving the location of a key that is always a menu key, how do I
  21. >get the 48 to believe that key has been pressed and evaluate whatever
  22. >function is assigned to the menu key at the time?
  23. >
  24. >What I have tried are the sequences: Key>StdKeyOb DoKeyOb
  25. >                     and: Key>StdKeyOb EVAL
  26. >
  27. >I have had limited success with these. If the menukey has some global
  28. >user variable name, such as that of a directory, a program or a list
  29. >both the above sequences work fine.
  30.  
  31. This should work in general, but I would suggest to use the former sequence
  32. (let DoKeyOb evaluating a keyob) with PTR 3F9FD instead of Key>StdKeyOb -
  33. PTR 3F9FD checks for special conditions (ParOuterLoop running, USER enabled
  34. etc.).
  35.  
  36. >However, if the menukey is for some built-in function, like PICT, the 48
  37. >will hang on trying either of the above sequences. Things that make you 
  38. >go mmmmmmhhhh...
  39. > [..]
  40. >Any ideas for how to achieve a reliable key press emulation? Why are
  41. >built-in objects causing trouble?
  42.  
  43. I didn't have any trouble when running the following program with menu 13.01
  44. being active; pressing the [A] key returns PICT into the stack (I also
  45. checked it with Key>StdKeyOb - same result):
  46.  
  47.  
  48. %%HP: T(3);
  49. "::
  50.  CK0NOLASTWD
  51.  BlankDA2
  52.  $ "Perform a keystroce\031"
  53.  DISPROW5
  54.  WaitForKey ( \-> #kc #pl )
  55.  PTR 3F9FD  ( \-> keyOb )
  56.  DoKeyOb
  57. ;"
  58.  
  59. Hope that helps,
  60.     8-Detlef
  61. --
  62. +------------------------------------+--------------------------------------+
  63. |`What a depressingly stupid machine'|             Detlef Mueller           |
  64. | -- Marvin                          |          detlef@dmhh.hanse.de        |
  65. +------------------------------------+--------------------------------------+
  66.