home *** CD-ROM | disk | FTP | other *** search
/ Simtel MSDOS 1992 September / Simtel20_Sept92.cdr / msdos / editor / nbmaster.arc / MASTERPM.OLD < prev    next >
Text File  |  1989-10-31  |  4KB  |  57 lines

  1. «glInitialize»
  2. Program to create macros (simple programs) on the fly. The program, once
  3. run, records all your operations, whether keyboard assignments or any
  4. combination of these with text. It then lets you assign it immediately to
  5. phrase key as well as save as permanent program.
  6. Program was written by Ernie Wallengren for (and with) XyWrite 3.1, uploaded
  7. in April 1986 to CompuServe and BIX (under the name "CAPTURE.PM"), adapted
  8. to Nota Bene, altered and augmented by Itamar Even-Zohar.
  9. Made compatible with Nota Bene 3.0 Hebrew version August 30, 1988.
  10.  
  11. The program was rewritten with the undocumented SA % function.
  12. ;-----------------------------------------------------------------------------
  13. ; Obtain initial values. If FS = 511, abort (all windows busy); if default NW
  14. ; <> 1, set it, if default bk <> 0, set it.
  15. «lbInitialize»«sx23,«VA$FS»»«if«pv23»==511» ü?«glNoWindow»«ei»«sx24,«VANW»»«sx25,«VABK»»«sv29,*»«sx10,1»«sv49,0»«sv57,9»«sv65,A»«sv78,N»«sv89,Y»«sv90,Z»«sv11,&»«if«pv25»==1» üdefault bk=0 ü    «ei»«sv50,__zzyzx.p0m»«sv16, ü    »«sv13,
  16. »«glBeginCapture»
  17. ; Record first keystroke.  If PrtSc key pressed, vacate:
  18. «lbBeginCapture» ü? ü Ç}«prBegin Keystroke Capture; PrtSc to abort»«sx98,«rc»»«if«is98»==«is29»»«sx10,0»«glRestoreVals»«ei»«pv98»«glCapture2»
  19. ;
  20. ; Concatenate keystrokes onto phrase 98:
  21. «lbCapture2»«sx99,«rc»»«if«is99»==«is29»» ües 1 ü    «glCheckFile»«ei»«pv99»«sx98,«is98»+«is99»»«glCapture2»
  22. ;
  23. «lbCheckFile» üexist «pv50» ü    «if«ER»»«glRecord»«ei» üernv «pv50» ü    «if«ER»»«sx10,-1»«glRestoreVals»«ei»«glRecord»
  24. ;
  25. ; Open a window; move contents of phrase 98 into temporary file;
  26. ; then prompt for phrase key and permanent storage.
  27. «lbRecord»«prWorking...» üA éÑvx«if«pv24»<>1» üdefault nw=1 ü    «ei» ünep «pv50» ü    «if«ER»»«sx10,-1» ü? ü éÑvo«glRestoreVals»«ei»«gt98» üsa ü     üab ü     ü?«pr» ü éÑvo Çm ÇWStrike desired key (A-Z,1-9,&A-&Z,&0-&9) or PrtSc to abandon: «glPickKey»
  28. ;
  29. «lbPickKey»«sx70,«rc»»«sx70,@upr(«is70»)»«if«is70»==«is11»»«glAmpersand»«ei»«if((«is70»>=«is65»)&(«is70»<=«is90»))»«glLoadNow»«ei»«if((«is70»>=«is49»)&(«is70»<=«is57»))»«glLoadNow»«ei»«if«is70»==«is29»»«sx10,0»«glErnv»«ei»«pr(&)Letter, (&)number or PrtSc only!»«glPickKey»
  30. ;
  31. «lbAmpersand»«sx71,«rc»»«sx71,@upr(«is71»)»«if((«is71»>=«is65»)&(«is71»<=«is90»))»«sx70,«is70»+«is71»»«glLoadNow»«ei»«if((«is71»>=«is49»)&(«is71»<=«is57»))»«sx70,«is70»+«is71»»«glLoadNow»«ei»«pr(&)Letter or (&)number only!»«glPickKey»
  32. ;
  33. «lbLoadNow» üldpm «pv50»,«pv70» ü     ü Çm ÇWDo you wish to record this program to disk for future use (y/n)? «glReadChar»
  34. ;
  35. «lbReadChar»«sx99,«rc»»«sx99,@upr(«is99»)»«if«is99»==«is78»»«glErnv»
  36. ;
  37. «lbErnv» üernv «pv50» ü    «glRestoreVals»«ei»«if«is99»==«is89»»«glRename»«ei» üYes (y) or No (n): «glReadChar»
  38. ;
  39. ; User wishes to save keystroke file to disk; prompt for filename, make sure
  40. ; it doesn't already exist, then rename temp file __zzyzx.p0m («pv50») to
  41. ; desired name.
  42. «lbRename» ües 1 ü     ü Çm ÇWType the filename (press enter/F10 to end): «glFilename»
  43. ;
  44. «lbFilename»«prPrtSc to Quit»«sx98,«rc»»«if«is98»==«is29»»«sx10,0»«glErnv»«ei»«pv98»«glFilename2»
  45. ;
  46. «lbFilename2»«prPrtSc to Quit»«sx99,«rc»»«if«is99»==«is29»»«sx10,0»«glErnv»«ei»«if((«is99»ε«is13»==0)!(«is99»==«is16»))»«glStore2»«ei»«pv99»«sx98,«is98»+«is99»»«glFilename2»
  47. ;
  48. «lbStore2» üexist «pv98» ü    «if«ER»==It does NOT exist»«glRename2»«ei» üIt already exists! Choose another name: «glFilename»
  49. ;
  50. «lbRename2» üren «pv50» «pv98» ü    «if«ER»==TRUE» üInvalid filename.  Choose another name: «glFilename»«ei»«glRestoreVals»f
  51. ;
  52. ; Restore original default values and quit:
  53. «lbRestoreVals» ües 0 ü    «if«pv24»<>1» üdefault nw=«pv24» ü    «ei»«if«pv25»==1» üdefault bk=1 ü    «ei» ü Ç}«if«pv10»==1»«prDone»«ex»«ei»«if«pv10»==0»«prKeystrokes discarded»«ex»«ei»«if«pv10»==-1»«prAborted! Cannot create temp file»«ex»
  54. ;
  55. «lbNoWindow» üAll windows in use.  This program needs an open window to run! ü    «ex»
  56.