home *** CD-ROM | disk | FTP | other *** search
/ The Datafile PD-CD 3 / PDCD_3.iso / pocketbk / utilsa / cword / README.TXT < prev   
Text File  |  1994-07-17  |  2KB  |  88 lines

  1. This zip contains a couple of potentially handy macros, for use with
  2. the KMAC macro facility on the S3a:
  3.  
  4. 1. A macro to insert the time-date string at the current cursor
  5. position of the foreground application
  6.  
  7. 2. A macro to count the number of words in a highlighted block of
  8. text in the Word Processor.
  9.  
  10. Each of these macros is customisable, so that users can improve their
  11. performance.
  12.  
  13. Files in this zip
  14. -----------------
  15. README.TXT      This documentation
  16. CWORD.DYL       Used by the word counting macro
  17. CWORDSRC.TXT    Discussion of source code of CWORD.DYL
  18.  
  19. Background
  20. ----------
  21. I assume you already have KMAC installed and running on your S3a.
  22. If not, see eg message 286 on the psion/files conference on CIX.
  23.  
  24. Additions to your top-level KMA file
  25. ------------------------------------
  26.  
  27. MACRO DateStamp
  28. KEY Z
  29. QUIET
  30. CONTENTS
  31. oM:\OPO\datestmp.opo
  32.  
  33. MACRO Count Words
  34. KEY K
  35. QUIET
  36. CONTENTS
  37. HA:\DYL\CWORD.DYL
  38.  
  39. Comments
  40. --------
  41. You can of course choose different key assignments, and/or alter the
  42. exact locations where the .OPO and .DYL files are expected to be
  43. found.
  44.  
  45. The first of these works by invoking an LPC-aware opl program (source
  46. given below), and then second works by getting the foreground process
  47. to hook the specified DYL.
  48.  
  49. Code for DATESTMP.OPL
  50. ---------------------
  51.  
  52.   PROC datestmp:
  53.     global lpcHand%,lpoHand%
  54.     loadm "m:\opo\kmaclib"
  55.     call($198d,100,0)
  56.     lpOpen:
  57.     lpWrite:(%f,"")
  58.     lpWrite:(%S,datim$)
  59.   ENDP
  60.  
  61. The CALL locks the running OPO into background, to leave the previous
  62. application in foreground.
  63.  
  64. The GLOBAL declarations are standard for an LPC-aware OPL program, as
  65. are the LOADM and lpOpen: lines.
  66.  
  67. The lpWrite:(%f,"") attaches to the foreground process.
  68.  
  69. The lpWrite:(%S,str$) then sends the string str$ to the attached
  70. process, character by character as separate keypresses.
  71.  
  72. If you don't like the particular format provided by DATIM$, change
  73. this bit of the program.
  74.  
  75. Where you have to put files
  76. ---------------------------
  77. The above macro definitions get edited into your top level .KMA file.
  78.  
  79. You need to translate the above .OPL program and then put the
  80. resulting .OPO wherever the "o" command expects to find it.
  81.  
  82. You need to put the file CWORD.DYL where the "H" command expects to
  83. find it.
  84.  
  85. How to invoke the macros
  86. ------------------------
  87. It's the same as for any other KMAC macro.
  88.