home *** CD-ROM | disk | FTP | other *** search
/ Amiga ISO Collection / AmigaUtilCD2.iso / Misc / HYPERBOOK2.DMS / in.adf / Applications / AppointmentBook.hb (.txt) < prev    next >
Encoding:
HyperBook  |  1990-10-07  |  29.5 KB  |  242 lines

  1. vIXdK
  2. "Appointment book"
  3. Drawing1
  4. Note1
  5. 10 am
  6. 11 am
  7. 12 pm
  8. Note2
  9. "9 am appointment"
  10. "10 am appointment"
  11. "11 am appointment"
  12. "12 pm appointment"
  13. "1 pm appointment"
  14. "2 pm appointment"
  15. "3 pm appointment"
  16. "4 pm appointment"
  17. "Cancel"
  18. CANCEL
  19. "Last week"
  20. Last week
  21. "Next week"
  22. Next week
  23. "Tomorrow"
  24. Tomorrow
  25. "Yesterday"
  26. Yesterday
  27. "Make new page"
  28. MAKE NEW
  29. Calendar page
  30. /* Enter appointment */
  31. ob = initiator()
  32. if ob = '' then EXIT
  33. if gettype(ob) ~= 'Note' then EXIT
  34. oldtx = deletetext(ob,0,-1)
  35. newtx = inputstring('Enter' getname(ob) 'data', compress(oldtx,'0a'X))
  36. if newtx = '' then newtx = oldtx
  37. call inserttext(ob, newtx, 0)
  38. Set appointment
  39. /* Cancel an appointment */
  40. row = getclickrow('Click on the appointment to be cancelled')
  41. col = getcolumn()
  42. ob = getobjectat(col, row)
  43. if ob = '' then EXIT
  44. nm = getname(ob)
  45. if gettype(ob) = 'Note' & right(nm,11) = 'appointment' then
  46.    call cleartext(ob)
  47. Cancel appointment
  48. V/* create new page in appointment book */
  49. call beginprompt('Working...')
  50. lpg  = objectnumber('',numpages())
  51. last = getname(lpg)
  52. pg   = mastertopage('Calendar page', 0)
  53. parse var last weekday month day '/' year .
  54. NEXT.MONDAY    = 'Tuesday'
  55. NEXT.TUESDAY   = 'Wednesday'
  56. NEXT.WEDNESDAY = 'Thursday'
  57. NEXT.THURSDAY  = 'Friday'
  58. NEXT.FRIDAY    = 'Monday'
  59. months = 'JanFebMarAprMayJunJulAugSepOctNovDecJan'
  60. weekday = upper(weekday)
  61. weekday = NEXT.weekday
  62. newmonth = 1
  63. if weekday == 'Monday' then
  64.    day = day + 3
  65.    day = day+1
  66. if year // 4 = 0 then
  67.    febdays = 29
  68.    febdays = 28
  69. if day > 31 then
  70.    day = 1
  71. else if day > 30 then do
  72.    if index('AprJunSepNov',month) > 0 then
  73.       day = 1
  74.    end
  75. else if day > febdays & month == 'Feb' then
  76.    day = 1
  77.    newmonth = 0
  78. if newmonth then
  79.    month = substr(months,index(months,month) + 3, 3)
  80. if day = 1 & month = 'Jan' then
  81.    year = year + 1
  82. call setname(pg, weekday month day || '/' || year)
  83. button = searchname(lpg,'Make new page')
  84. if length(button) > 0 then
  85.    if getpage(button) = lpg then
  86.       call delete(button)
  87. call gotopage(pg)
  88. NewPage
  89. e/* Go back 5 pages */
  90. n = sequencenumber(':')
  91. if n > 5 then call gotopage(objectnumber('', n - 5))
  92.     Last week
  93. s/* Go ahead 5 days */
  94. n = sequencenumber(':')
  95. if n <= numpages() - 5 then call gotopage(objectnumber('', n + 5))
  96.     Next week
  97. "Appointment book"
  98. Drawing1
  99. Note1
  100. 10 am
  101. 11 am
  102. 12 pm
  103. Note2
  104. "9 am appointment"
  105. Don't forget to clone that
  106. page! But first, walk the
  107. "10 am appointment"
  108. Improve the lot of humanity
  109. in some important way.
  110. "11 am appointment"
  111. Fly to Bermuda (remember to
  112. flap faster this time).
  113. "12 pm appointment"
  114. Build a house underneath a
  115. big, spreading tree. Live in
  116. "1 pm appointment"
  117. Lunch with Fifi, Bambi,
  118. oise and Inge
  119. "2 pm appointment"
  120. Talk to J.B. about acquiring
  121. that Brazilian whoopee
  122. cushion conglomerate.
  123. "3 pm appointment"
  124. Sell that extra company of
  125. ours to some foreigner.
  126. "4 pm appointment"
  127. Invest heavily in a
  128. plummeting stock.
  129. "Last week"
  130. Last week
  131. "Next week"
  132. Next week
  133. "Tomorrow"
  134. Tomorrow
  135. "Yesterday"
  136. Yesterday
  137. "Cancel"
  138. CANCEL
  139. "Info"
  140. This is an ARexx-driven version of a
  141. standard business appointment calendar.
  142. To create a new page, go to the end of
  143. the calendar and click on the "Make new
  144. page" gadget. To create/edit an entry
  145. for a particular time of day, just
  146. click on the time slot desired.
  147. Drawing1
  148. "Thursday Oct 4/90"
  149. "Appointment book"
  150. Drawing1
  151. Note1
  152. 10 am
  153. 11 am
  154. 12 pm
  155. Note2
  156. "9 am appointment"
  157. Pick up a cow at the cow
  158. store.
  159. "10 am appointment"
  160. "11 am appointment"
  161. "12 pm appointment"
  162. "1 pm appointment"
  163. "2 pm appointment"
  164. Sign a treaty, start a war.
  165. "3 pm appointment"
  166. "4 pm appointment"
  167. Late lunch with Sinatra.
  168. Remind Frank about money.
  169. "Cancel"
  170. CANCEL
  171. "Last week"
  172. Last week
  173. "Next week"
  174. Next week
  175. "Tomorrow"
  176. Tomorrow
  177. "Yesterday"
  178. Yesterday
  179. "Friday Oct 5/90"
  180. "Appointment book"
  181. Drawing1
  182. Note1
  183. 10 am
  184. 11 am
  185. 12 pm
  186. Note2
  187. "9 am appointment"
  188. "10 am appointment"
  189. Dentist... have mouth
  190. removed.
  191. "11 am appointment"
  192. "12 pm appointment"
  193. "1 pm appointment"
  194. Get blind drunk in sleazy
  195. bar. Forget it happened.
  196. "2 pm appointment"
  197. "3 pm appointment"
  198. "4 pm appointment"
  199. Ask for - nay, demand -
  200. sizable raise.
  201. "Cancel"
  202. CANCEL
  203. "Last week"
  204. Last week
  205. "Next week"
  206. Next week
  207. "Tomorrow"
  208. Tomorrow
  209. "Yesterday"
  210. Yesterday
  211. "Monday Oct 8/90"
  212. "Appointment book"
  213. Drawing1
  214. Note1
  215. 10 am
  216. 11 am
  217. 12 pm
  218. Note2
  219. "9 am appointment"
  220. "10 am appointment"
  221. Change plans for 12 o'clock
  222. appointment.
  223. "11 am appointment"
  224. "12 pm appointment"
  225. "1 pm appointment"
  226. "2 pm appointment"
  227. "3 pm appointment"
  228. "4 pm appointment"
  229. "Cancel"
  230. CANCEL
  231. "Last week"
  232. Last week
  233. "Next week"
  234. Next week
  235. "Tomorrow"
  236. Tomorrow
  237. "Yesterday"
  238. Yesterday
  239. "Make new page"
  240. MAKE NEW
  241. "Tuesday Oct 9/90"
  242.