home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #16 / NN_1992_16.iso / spool / comp / os / vms / 12989 < prev    next >
Encoding:
Internet Message Format  |  1992-07-30  |  10.6 KB

  1. Path: sparky!uunet!mcsun!sun4nl!phigate!cnplss5!cnplss5.cnps.philips.nl!nl0242to
  2. From: nl0242to@cnplss5.cnps.philips.nl (Oscar van Eijk)
  3. Newsgroups: comp.os.vms
  4. Subject: Agenda.Com; an easy reminder tool (imho:-)
  5. Message-ID: <1992Jul30.082155.7005@cnplss5.cnps.philips.nl>
  6. Date: 30 Jul 92 08:21:55 GMT
  7. Sender: news@cnplss5.cnps.philips.nl (USENET News System)
  8. Organization: Philips Centre For Technology, Eindhoven
  9. Lines: 270
  10. Nntp-Posting-Host: cnplss5.cnps.philips.nl
  11.  
  12.  
  13. ----------------------- Start Readme.Txt -----------------
  14.  
  15. This is Agenda.Com v1.0, a simple tool that may be very handy to
  16. help you remember whatever you want to remember. I wrote it because
  17. I often was working on something, writing a program or whatever, when
  18. it was time to go home or for some other reason I had to stop. What I
  19. did then is send myself a mail to remember where I had stopped. This,
  20. however, is much easier.
  21.  
  22. I called the tool 'Agenda', not a very well chosen name, 'Reminder' would
  23. be much better, but I had already written another tool which is called
  24. 'Reminder'.
  25.  
  26. To use this is very simple. Just make sure you've got a logical defined
  27. called 'dat:' somwhere in your login. Put a line in your login.com
  28.  
  29. $ @my_disk:[my_dir]agenda login
  30.  
  31. and your reminder messages will be shown at every login.
  32. I've also got the next lines in my login:
  33.  
  34. $ define/key/noecho/nolog/terminate f17 "$@com:agenda read"
  35. $ define/key/noecho/nolog/terminate f18 "$@com:agenda create"
  36.  
  37. (where 'com:' is a logical pointing to my 'damn-easy-tools'-directory)
  38. So when I have to go due to who-cares-anyway, I just press <f18>, leave a
  39. message to myself and go.
  40.  
  41. I know more advanced tools like this have been written, but this one's small,
  42. fast, easy to use and easy to modify.
  43.  
  44. If you like it, let me know. If you don't... well,...forget it.
  45.  
  46. Oscar van Eijk
  47.  
  48. ---------
  49.  Abandon Hope                                                   Oscar van Eijk
  50.    All Ye                     O x x y                 C&P SON helpdesk, VN-223
  51. Who Enter Here                            Philips Eindhoven, the Net(her)Lands
  52.                                                nl0242t@nlzcl.decnet.philips.nl
  53.  
  54. ------------------------ End Readme.Txt ------------------
  55. ----------------------- Start Agenda.Com -----------------
  56. $    set noverify
  57. $    on error then $ goto error_occured
  58. $    on severe_error then $ goto error_occured
  59. $    on control_y then $ goto end
  60. $    goto start
  61. $!
  62. $!******************************************************************************
  63. $!*                                                                            *
  64. $!*  FILENAME:                                                                 *
  65. $!*  =========                                                                 *
  66. $!*     Agenda.Com                                                             *
  67. $!*                                                                            *
  68. $!*  DESCRIPTION:                                                              *
  69. $!*  ============                                                              *
  70. $!*     This procedure creates the facility to make reminder messages          *
  71. $!*     that can be shown at login time. These messages can contain            *
  72. $!*     everything the user wants to be reminded of.                           *
  73. $!*                                                                            *
  74. $!*  LOGICALS NEEDED:                                                          *
  75. $!*  ================                                                          *
  76. $!*     Dat                        Location of the messages                    *
  77. $!*                                                                            *
  78. $!*  PARAMETERS NEEDED:                                                        *
  79. $!*  ==================                                                        *
  80. $!*     P1                         can be: 'login'  - asks if messages have    *
  81. $!*                                                   to be shown              *
  82. $!*                                        'read'   - shows the messages       *
  83. $!*                                        'create' - creates a new message    *
  84. $!*                                                                            *
  85. $!*                                                                            *
  86. $!*  FILES NEEDED:                                                             *
  87. $!*  =============                                                             *
  88. $!*     Msg_%%%%%%%%%%%%%%%.dat    The messages                                *
  89. $!*                                                                            *
  90. $!*  HISTORY:                                                                  *
  91. $!*  ========                                                                  *
  92. $!*     Version:    Date:       Author:                    Changes:            *
  93. $!*     --------    -----       -------                    --------            *
  94. $!*     1.0         10-06-1992  Oscar van Eijk, CompuHelp                      *
  95. $!*                                                                            *
  96. $!******************************************************************************
  97.  
  98.  
  99. $!******************************************************************************
  100. $!
  101. $!==>    Check on the parameter.    
  102. $!
  103. $ start:
  104. $!
  105. $    ws  := "write sys$output"
  106. $    cls := "write sys$output ""[2J[1;1H""
  107. $    If p1 .eqs. "LOGIN"  then $ goto checkl_message
  108. $    If p1 .eqs. "READ"  then $ goto checkc_message
  109. $    If p1 .eqs. "CREATE" then $ goto create_message
  110. $    read/end=end/prompt="Read or Create message ? (R/C) : " sys$command act
  111. $    if f$edit(f$extract(0,1,act),"upcase") .eqs. "R" then $ goto checkc_message
  112. $    if f$edit(f$extract(0,1,act),"upcase") .eqs. "C" then $ goto create_message
  113. $    goto start
  114. $!
  115. $!******************************************************************************
  116.  
  117.  
  118. $!******************************************************************************
  119. $!
  120. $!==>    At login time there'll always be checked for messages
  121. $!
  122. $ checkl_message:
  123. $!
  124. $    fmsg_counter = 0
  125. $!
  126. $ count_loopl:
  127. $!
  128. $    found = f$search("dat:msg_%%%%%%%%%%%%%%%.dat")
  129. $    if found .eqs. "" then $ goto ask_show
  130. $    fmsg_counter = fmsg_counter + 1
  131. $    goto count_loopl
  132. $!
  133. $!******************************************************************************
  134.  
  135.  
  136. $!******************************************************************************
  137. $!
  138. $!==>    Messages are found at login time. Ask if they have to been shown
  139. $!
  140. $ ask_show:
  141. $!
  142. $    if fmsg_counter .eq. 0 then $ goto end
  143. $    if fmsg_counter .eq. 1
  144. $       then
  145. $        read/end=end/prompt="1 message found, show now ? ([Y]/N) : " sys$command shownow
  146. $       else
  147. $        read/end=end/prompt="''fmsg_counter' messages found, show now ? ([Y]/N) : " sys$command shownow
  148. $    endif
  149. $    if f$edit(f$extract(0,1,shownow),"upcase") .eqs. "N" then $ goto end
  150. $    goto show_messages
  151. $!
  152. $!******************************************************************************
  153.  
  154.  
  155. $!******************************************************************************
  156. $!
  157. $!==>    There was asked to show messages. Check for existance
  158. $!
  159. $ checkc_message:
  160. $!
  161. $    fmsg_counter = 0
  162. $!
  163. $ count_loopc:
  164. $!
  165. $    found = f$search("dat:msg_%%%%%%%%%%%%%%%.dat")
  166. $    if found .eqs. ""
  167. $       then
  168. $        if fmsg_counter .eq. 0
  169. $           then
  170. $            ws "No messages found"
  171. $            wait 00:00:01
  172. $            goto end
  173. $           else
  174. $            found = f$search("reset.dummy")
  175. $            goto show_messages
  176. $        endif
  177. $    endif
  178. $    fmsg_counter = fmsg_counter + 1
  179. $    goto count_loopc
  180. $!
  181. $!******************************************************************************
  182.  
  183.  
  184. $!******************************************************************************
  185. $!
  186. $!==>    One ore more messages were found. Show them
  187. $!
  188. $ show_messages:
  189. $!
  190. $    found = f$search("dat:msg_%%%%%%%%%%%%%%%.dat")
  191. $    if found .eqs. "" then $ goto end
  192. $    fmsg_counter = fmsg_counter - 1
  193. $    cls
  194. $    type/page 'found'
  195. $    ws ""
  196. $    ws "qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq"
  197. $    if fmsg_counter .eq. 0
  198. $       then
  199. $        read/end=end/prompt="last; Delete message, Edit message, Quit, (D/E/[Q]) : " sys$command act
  200. $       else
  201. $        read/end=end/prompt="''fmsg_counter' more; Delete message, Edit message, Quit, Next, (D/E/Q/[N]) : " sys$command act
  202. $    endif
  203. $    if f$edit(f$extract(0,1,act),"upcase") .eqs. "D"
  204. $       then
  205. $        read/end=show_messages/prompt="Do you really want to delete this message ? (Y/[N]) : " sys$command delconf
  206. $        if f$edit(f$extract(0,1,delconf),"upcase") .eqs. "Y" then -
  207.            $delete/nolog/noconfirm 'found'
  208. $        goto show_messages
  209. $    endif
  210. $    if f$edit(f$extract(0,1,act),"upcase") .eqs. "E"
  211. $       then
  212. $        assign TT: sys$input
  213. $        edit/tpu 'found'
  214. $        mess_off
  215. $        purge/noconfirm/nolog/keep=1 dat:msg_%%%%%%%%%%%%%%%.dat
  216. $        mess_on
  217. $        goto show_messages
  218. $    endif
  219. $    if f$edit(f$extract(0,1,act),"upcase") .eqs. "Q" then $ goto end
  220. $    goto show_messages
  221. $!
  222. $!******************************************************************************
  223.  
  224.  
  225. $!******************************************************************************
  226. $!
  227. $!==>    Create a new message
  228. $!
  229. $ create_message:
  230. $!
  231. $    fn_extract = "''f$extrac(0,2,f$time())'''f$extrac(3,3,f$time())'" + -
  232.                      "''f$extrac(9,2,f$time())'''f$extrac(12,2,f$time())'" + -
  233.                      "''f$extrac(15,2,f$time())'''f$extrac(18,2,f$time())'" + -
  234.                      "''f$extrac(21,2,f$time())'"
  235. $    if f$extract(0,1,fn_extract) .eqs. " " then -
  236.        $ fn_extract[0,1] := "0"
  237. $    assign TT: sys$input
  238. $    edit/tpu dat:msg_'fn_extract'.dat
  239. $    goto end
  240. $!
  241. $!******************************************************************************
  242.  
  243.  
  244. $!******************************************************************************
  245. $!
  246. $!==>    Something weird happened. A message of the error will be displayed
  247. $!    after which the program exits
  248. $!
  249. $ error_occured:
  250. $!
  251. $    error_status  = "''$status'"
  252. $    error_message = f$message('error_status')
  253. $    on error then $ continue
  254. $    cls
  255. $    ws ""
  256. $    ws " *** ERROR ***  Some Undefined Error Occured."
  257. $    ws ""
  258. $    ws "-- Status  was  : ''error_status'"
  259. $    ws "-- Message was  : ''error_message'"
  260. $    exit
  261. $!
  262. $!******************************************************************************
  263.  
  264.  
  265.  
  266. $!******************************************************************************
  267. $!
  268. $!==>    Well, try to guess what's gonna happen... :-)
  269. $!
  270. $ end:
  271. $!
  272. $    cls
  273. $    exit
  274. $!
  275. $!******************************************************************************
  276. ------------------------ End Agenda.Com ------------------
  277. -- 
  278.  Abandon Hope                                                   Oscar van Eijk
  279.    All Ye                     O x x y                 C&P SON helpdesk, VN-223
  280. Who Enter Here                            Philips Eindhoven, the Net(her)Lands
  281.                                                nl0242t@nlzcl.decnet.philips.nl
  282.