home *** CD-ROM | disk | FTP | other *** search
/ Beijing Paradise BBS Backup / PARADISE.ISO / software / BBSDOORW / PCLPACK.ZIP / NICE.ZIP / CTLS.ZIP / READ.CTL < prev    next >
Encoding:
Text File  |  1992-09-07  |  6.1 KB  |  269 lines

  1. setequal(n=1)
  2. setequal(x=1)
  3. *read
  4. setequal(r=0)
  5. setequal(w=1)
  6. setactivity(Reading Mail)
  7. *rmail
  8. notif (&n)=(1) then goto (endmr) ;if they came back...
  9. setequal(n=0)
  10. *brmail
  11. linefeed(1)
  12. himsg(/:LASTMSG/)
  13. setequal(f=%ARESP%)
  14. lowmsg(/:lastmsg/)
  15. setequal(n=%ARESP%)
  16. display (display\READ)
  17. setequal(y=%ARESP%)
  18. setequal(z=0)
  19. numbmenuask%CRON%(&3&Which read mail number or option would you like?&12&: &15&*)
  20. bignicesay(r:Reverse,q:quit,m:Since last read,s:Search,y:your mail,h:help)
  21. bigif(r:rev,m:since,s:search,y:Your,h:help,<CR>:qt,q:qt)
  22. number(%RESP%)
  23. if (%RESP%)=(0) then goto (inv2)
  24. iftrue (goto (nread))
  25. goto (inv2)
  26. *qt
  27. return
  28.  
  29. *help
  30. display(display\help\read,/:SEC/)
  31. goto (brmail)
  32.  
  33. *nread
  34. cmpval(%var%f,%RESP%)
  35. iftrue (goto (inv2))
  36. cmpval(%var%n,%RESP%)
  37. ifnottrue(setequal(/resp=%var%n))
  38. setequal(w=1)
  39. setequal(y=%RESP%)
  40. goto (repeat)
  41.  
  42. *since
  43. msghigh(/:LASTMSG/)
  44. setequal(y=%ARESP%)
  45. cmpval(%var%f,%var%y)
  46. iftrue (goto (inv2))
  47. cmpval(%var%n,%VAR%Y)
  48. ifnottrue(setequal(y=%var%n))
  49. setequal(w=1)
  50. setequal(s=0)
  51. goto (repeat)
  52.  
  53. *repeat
  54. inittxt
  55. setequal(s=0)
  56. getmail(%var%y,/:LASTMSG/,%var%w)
  57. if (%MsgNumber%)=(0) then goto (0next)
  58. setequal(z=10)
  59. notif (%ARESP%)=(Yes) then goto (nope)
  60. *banyway
  61. clearscr
  62. setequal(x=0)
  63. setequal(s=0)
  64. setequal(g=%RESP%)
  65. nicedate(%MSGSNTD%)
  66. say(&11&Message Number &3&%MsgNumber%&11& of &3&%var%f&11& was sent on&3& %ARESP%&11& at &3&*)
  67. nicetime(%MSGSNTT%)
  68. nicesay(%ARESP%&14&&CR&        Sent by: &3&%MSGFROM%&CR&&14&   Addressed to: &3&%MSGTO% )
  69. say(&14&      Regarding: &3&%MSGDESC% )
  70. nicesay(&14&         Status: &3&%MSGPVT%, %MSGRCVD%, Read %MSGRDTIMES% times, %REPLIES%)
  71. spause(8)
  72. if (%MSGATTACH%)=(Y) then if (%MSGPVT%)=(PRIVATE) then setequal(s=10)
  73. if (%MSGATTACH%)=(Y) then say (&12&* &14&File Attached: &3&%MSGATTNAME%)
  74. if (&s)=(10) then spause(9)
  75. say(&8&────────────────────────────────────────────────────────────────────────&CR&&7&)
  76. showtxt
  77. *reading
  78. if (&s)=(0) then display (display\READING)
  79. if (&s)=(10) then display (display\READINGA)
  80. numbmenuask %CRON%(&3&Which reading &11&option &3&or &11&message number&3&?&12&: &15&*)
  81. bignicesay(e:edit,q:quit,r:reply,s:Show again,n:next,f:forward thread,p:previous message,k:kill,o:Forward,h:help)
  82. if (&s)=(10) then bignicesay(d:Download Attach)
  83. bigif (e:edit,o:forw,q:qdisp,s:repeat,r:reply,p:previous,f:follow,k:kill,n:next,h:help2)
  84. bigif (d:downatt)
  85. if (%RESP%)=(<CR>) then goto (next)
  86. number(%RESP%)
  87. iftrue (goto (nread))
  88. setequal(s=5)
  89. goto (inv2)
  90.  
  91. *help2
  92. display(display\help\readn,/:SEC/)
  93. goto (reading)
  94.  
  95. *downatt
  96. zap(varr.%NODE%,%var%R)
  97. linefeed(1)
  98. loadsub(control\DOWNATT.CTL)
  99. goto (repeat)
  100.  
  101. *forw
  102. namequal(a=%MSGTO%)
  103. namequal(b=%NAME%)
  104. if (&a)=(&b) then goto (okf)
  105. namequal(a=%MSGFROM%)
  106. if (&a)=(&b) then goto (okf)
  107. setequal(s=5)
  108. goto (inv2)
  109. *okf
  110. loadsub(control\macros\forw.ctl)
  111. goto (repeat)
  112.  
  113. *your
  114. cmenuask(&CR&&3&Starting at which message number?&11&(%var%n-%var%f)&12&: &15&*)
  115. say(&CR&&11&Searching...|)
  116. clearmem
  117. seekto(/:LASTMSG/,%NAME%,%RESP%)
  118. if (%ARESP%)=(ERROR) then goto (endmr)
  119. log(--,Scanned for (Y)our mail)
  120. eline(25)
  121. zap(seeking.%NODE%,1)
  122. appendto(seeking.%NODE%,%NAME%)
  123. if (%ARESP%)=(ERROR) then goto (endmr)
  124. setequal(r=20)
  125. setequal(u=0)
  126. goto (snext)
  127.  
  128. *search
  129. loadsub(control\macros\msearch.ctl)
  130. if (%RESP%)=(Q) then goto (endmr)
  131. notif (%ARESP%)=(ERROR) then goto (snext)
  132. goto (endmr)
  133.  
  134. *rev
  135. if (&y)=(0) then goto (inv2)
  136. setequal(y=%var%f)
  137. setequal(w=-1)
  138. if (&y)=(0) then goto (inv2)
  139. goto (repeat)
  140.  
  141. *snext
  142. inc(u)
  143. setequal(y=^:U^)
  144. if (^:U^)=(MOREMAIL) then goto (fmore)
  145. if (^:U^)=() then goto (endmr)
  146. goto (repeat)
  147.  
  148. *fmore
  149. addvar(&u+-1=u)
  150. inpline(seeking.%NODE%,1)
  151. setequal(p=%ARESP%)
  152. inpline(seeking.%NODE%,2)
  153. if (&p)=(1) then seekto(/:lastmsg/,%ARESP%,^:u^)
  154. if (&p)=(2) then seekfrom(/:lastmsg/,%ARESP%,^:u^)
  155. if (&p)=(3) then seekdesc(/:lastmsg/,%ARESP%,^:u^)
  156. if (&p)=(4) then seektext(/:lastmsg/,%ARESP%,^:u^)
  157. setequal(u=0)
  158. goto (repeat)
  159.  
  160. *lnext
  161. inc(u)
  162. setequal(y=^:U^)
  163. if (^:U^)=() then goto (endmr)
  164. goto (repeat)
  165.  
  166. *qdisp
  167. linefeed(1)
  168. if (&r)=(10) then goto (endmr)
  169. Return
  170.  
  171. *0next
  172. if (&r)=(10) then goto (lnext)
  173. if (&r)=(20) then goto (snext)
  174. if (&y)=(0) then goto (inv2)
  175. if (&y)=(-1) then goto (inv2)
  176. addvar(%var%y+%var%w=y)
  177. if (&y)=(0) then goto (inv2)
  178. cmpval(%var%f,%var%y)
  179. iftrue (goto (inv2))
  180. goto (repeat)
  181.  
  182. *smore
  183. notif (&x)=(1) then say(&10&Searching for more messages...|)
  184. setequal(x=1)
  185. setequal(s=10)
  186.  
  187. *next
  188. if (&r)=(10) then goto (lnext)
  189. if (&s)=(0) then goto (smore)
  190. if (&r)=(20) then goto (snext)
  191. if (&y)=(0) then goto (inv2)
  192. if (&y)=(-1) then goto (inv2)
  193. notif (%MRESP%)=() then goto (sknext)
  194. addvar(%var%y+%var%w=y)
  195. if (&y)=(0) then goto (inv2)
  196. cmpval(%var%f,%var%y)
  197. iftrue (goto (inv2))
  198. goto (repeat)
  199. *sknext
  200. setequal(y=%MRESP%)
  201. if (&y)=(0) then goto (inv2)
  202. cmpval(%var%f,%var%y)
  203. iftrue (goto (inv2))
  204. goto (repeat)
  205.  
  206. *kill
  207. enufsec(100)
  208. iftrue(goto (stkill))
  209. setequal(a=%NAME%)
  210. upcase(a)
  211. setequal(i=%MSGFROM%)
  212. upcase(i)
  213. setequal(j=%MSGTO%)
  214. upcase(j)
  215. notif (&i)=(&a) then notif (&j)=(&a) then goto (repeat)
  216. *stkill
  217. msgkill (/:LASTMSG/,%var%y)
  218. say(&12&&CR&Message #%var%y has been deleted!&CR&)
  219. goto (next)
  220.  
  221. *follow
  222. if (%REPLIES%)=(NO REPLIES) then goto (nomore)
  223. setequal(s=5)
  224. setequal(q=%MSGPREV%)
  225. if (%MSGPREV%)=(0) then setequal(q=%var%y)
  226. nextforward(%var%q,%var%y,/:LASTMSG/)
  227. if (%ARESP%)=(0) then goto (nomore)
  228. setequal(y=%ARESP%)
  229. goto (repeat)
  230. *nomore
  231. say(&CR&&12&There are no more replies to this message.&CR&)
  232. goto (reading)
  233.  
  234. *previous
  235. setequal(s=5)
  236. if (%MSGPREV%)=(0) then goto (inv2)
  237. setequal(y=%MSGPREV%)
  238. goto (repeat)
  239.  
  240. *edit
  241. loadsub(control\macros\edit.ctl)
  242. goto (repeat)
  243.  
  244. *reply
  245. loadsub(control\macros\reply.ctl)
  246. goto (repeat)
  247.  
  248. *inv2
  249. if (&s)=(10) then goto (abb)
  250. say(&CR&&12&Invalid selection! Please try again...)
  251. secpause(1)
  252. flushout
  253. if (&s)=(5) then goto (reading)
  254. *abb
  255. if (&z)=(0) then goto (brmail)
  256. goto (endmr)
  257.  
  258. *nope
  259. if (%ARESP%)=(ERROR) then goto (next)
  260. if (%ARESP%)=(DELETED) then goto (next)
  261. enufsec(100)
  262. iftrue (goto (banyway))
  263. goto (next)
  264.  
  265. *endmr
  266. say(&11&&CR& ══ &14&No more mail found for you to read, %FNAME%&11& ══&CR&)
  267. enter
  268. Return
  269.