home *** CD-ROM | disk | FTP | other *** search
/ Media Share 9 / MEDIASHARE_09.ISO / diags / pandor23.zip / KEYMACRO.PAN < prev    next >
Text File  |  1991-09-09  |  4KB  |  169 lines

  1. Output "^M^JThis Pandora script demonstrates Pandora's potential for implementing^M^J"
  2. Output "an application-specific keyboard-macro processor.  This script works with^M^J"
  3. Output "a program called KeyEcho.  If you run KeyEcho by itself you'll see that it^M^J"
  4. Output "simply echoes whatever you type to the screen.  When you press a text key^M^J"
  5. Output "the character is displayed.  When you press a function key, a cursor key,^M^J"
  6. Output "or some other non-text key then the keyboard code for that key is displayed^M^J"
  7. Output "in hexadecimal.^M^J"
  8. Output "^M^J"
  9. Output "In this demonstration, macros are assigned to Alt-letter keys.  Try^M^J"
  10. Output "pressing Alt-A, Alt-B, etc.  And don't miss Alt-H.^M^J"
  11. Output "^M^J"
  12. Output "Please press the [Space Bar] to continue.  Press [Esc] to exit..."
  13. GetKey
  14. IfKey "[Esc]"
  15.     Quit
  16. EndIf
  17. IfLoad "KEYECHO.COM"
  18.     Output "^M^JLoading the KeyEcho program..."
  19. Else
  20.     Output "^M^JCannot find KEYECHO.COM!"
  21.     Quit
  22. EndIf
  23. Output "^M^JOkay starting typing:^M^J"
  24. Go ""
  25. OnDeath epilog
  26. Label 00
  27. WaitKey
  28. IfKey "[Alt]A[Alt]B[Alt]C[Alt]D[Alt]E[Alt]F[Alt]G"
  29.     IfKey "[Alt]A"
  30.         Key "You just pressed Alt-A^M"
  31.         Jump 00
  32.     EndIf
  33.     IfKey "[Alt]B"
  34.         Key "'Twas brillig and the slithy toves..."
  35.         Jump 00
  36.     EndIf
  37.     IfKey "[Alt]C"
  38.         Key "Can you type this as fast as Pandora???"
  39.         Jump 00
  40.     EndIf
  41.     IfKey "[Alt]D"
  42.         Key "Press Alt-H for help on the macro facility^M"
  43.         Jump 00
  44.     EndIf
  45.     IfKey "[Alt]E"
  46.         Tone 1329 3t
  47.         Jump 00
  48.     EndIf
  49.     IfKey "[Alt]F"
  50.         Key "F"
  51.         Jump 00
  52.     EndIf
  53.     IfKey "[Alt]G"
  54.         Key "Gee"
  55.         Jump 00
  56.     EndIf
  57. EndIf
  58. IfKey "[Alt]H[Alt]I[Alt]J[Alt]K[Alt]L[Alt]M[Alt]N"
  59.     IfKey "[Alt]H"
  60.         WriteScreen screen.$$$
  61.         VideoFore Yellow
  62.         VideoBack Magenta
  63.         Screen  8 10 "╔═══════════════════════════════════════════════════════════════╗"
  64.         Screen  9 10 "║                                                               ║"
  65.         Screen 10 10 "║            Pandora Keyboard Macro Demonstration.              ║"
  66.         Screen 11 10 "║  Help text for your actual macro facility would appear here.  ║"
  67.         Screen 12 10 "║                 Press the [Space Bar] to continue.            ║"
  68.         Screen 13 10 "║                                                               ║"
  69.         Screen 14 10 "╚═══════════════════════════════════════════════════════════════╝"
  70.         GetKey
  71.         ReadScreen screen.$$$
  72.         Jump 00
  73.     EndIf
  74.     IfKey "[Alt]I"
  75.         Key "I, <your name here>, "
  76.         Jump 00
  77.     EndIf
  78.     IfKey "[Alt]J"
  79.         Key ""
  80.         Jump 00
  81.     EndIf
  82.     IfKey "[Alt]K"
  83.         Key "^MKill this program? (Y/N)"
  84.         GetKey
  85.         IfKey "Yy"
  86.             KillChild
  87.             Quit
  88.         Else
  89.             Key "^M"
  90.         EndIf
  91.         Jump 00
  92.     EndIf
  93.     IfKey "[Alt]L"
  94.         Wipe
  95.         Jump 00
  96.     EndIf
  97.     IfKey "[Alt]M"
  98.         Key "Musical Interlude!"
  99.         Tone 247 2t
  100.         Tone 247 14t
  101.         Tone 247 6t
  102.         Tone 247 2t
  103.         Tone 277 4t
  104.         Tone 247 4t
  105.         Pause 4t
  106.         Jump 00
  107.     EndIf
  108.     IfKey "[Alt]N"
  109.         Key "1,000,000"
  110.         Jump 00
  111.     EndIf
  112. EndIf
  113. IfKey "[Alt]O[Alt]P[Alt]Q[Alt]R[Alt]S[Alt]T[Alt]U"
  114.     IfKey "[Alt]O"
  115.         Key "You just pressed Alt-O^M"
  116.         Jump 00
  117.     EndIf
  118.     IfKey "[Alt]P"
  119.         Key "^J^J^J"
  120.         Jump 00
  121.     EndIf
  122.     IfKey "[Alt]Q"
  123.         Key "^K^K^K"
  124.         Jump 00
  125.     EndIf
  126.     IfKey "[Alt]R"
  127.         Key "I'm getting bored thinking up macros..."
  128.         Jump 00
  129.     EndIf
  130.     IfKey "[Alt]S"
  131.         Tone 1329 3t
  132.         Jump 00
  133.     EndIf
  134.     IfKey "[Alt]T"
  135.         Key "Tea for two and two for tea..."
  136.         Jump 00
  137.     EndIf
  138.     IfKey "[Alt]U"
  139.         Key "^MMe for you and you for me"
  140.         Jump 00
  141.     EndIf
  142. EndIf
  143. IfKey "[Alt]V[Alt]W[Alt]X[Alt]Y[Alt]Z"
  144.     IfKey "[Alt]V"
  145.         Key "╔"
  146.         Jump 00
  147.     EndIf
  148.     IfKey "[Alt]W"
  149.         Key "═"
  150.         Jump 00
  151.     EndIf
  152.     IfKey "[Alt]X"
  153.         Key "╗"
  154.         Jump 00
  155.     EndIf
  156.     IfKey "[Alt]Y"
  157.         Key "║"
  158.         Jump 00
  159.     EndIf
  160.     IfKey "[Alt]Z"
  161.         Key "√"
  162.         Jump 00
  163.     EndIf
  164. EndIf
  165. PassKey
  166. Jump 00
  167. Label epilog
  168. Quit
  169.