home *** CD-ROM | disk | FTP | other *** search
/ BBS in a Box 7 / BBS in a Box - Macintosh - Volume VII (BBS in a Box) (January 1993).iso / Files / Hyper / P / PerpetCalendar.cpt / Calendar / card_13030.txt < prev    next >
Encoding:
Text File  |  1989-10-16  |  5.6 KB  |  179 lines

  1. -- card: 13030 from stack: in
  2. -- bmap block id: 2519
  3. -- flags: 0000
  4. -- background id: 5523
  5. -- name: intro
  6.  
  7.  
  8. -- part 1 (field)
  9. -- low flags: 01
  10. -- high flags: 0000
  11. -- rect: left=124 top=49 right=66 bottom=338
  12. -- title width / last selected line: 0
  13. -- icon id / first selected line: 0 / 0
  14. -- text alignment: 0
  15. -- font id: 3
  16. -- text size: 10
  17. -- style flags: 0
  18. -- line height: 13
  19. -- part name: 
  20.  
  21.  
  22. -- part 2 (field)
  23. -- low flags: 01
  24. -- high flags: 0000
  25. -- rect: left=32 top=72 right=315 bottom=409
  26. -- title width / last selected line: 0
  27. -- icon id / first selected line: 0 / 0
  28. -- text alignment: 0
  29. -- font id: 3
  30. -- text size: 12
  31. -- style flags: 256
  32. -- line height: 16
  33. -- part name: 
  34.  
  35.  
  36. -- part 4 (field)
  37. -- low flags: 01
  38. -- high flags: 0000
  39. -- rect: left=120 top=30 right=56 bottom=344
  40. -- title width / last selected line: 0
  41. -- icon id / first selected line: 0 / 0
  42. -- text alignment: 1
  43. -- font id: 3
  44. -- text size: 12
  45. -- style flags: 256
  46. -- line height: 16
  47. -- part name: 
  48.  
  49.  
  50. -- part 16 (button)
  51. -- low flags: 00
  52. -- high flags: 0000
  53. -- rect: left=244 top=161 right=194 bottom=275
  54. -- title width / last selected line: 0
  55. -- icon id / first selected line: 20965 / 20965
  56. -- text alignment: 1
  57. -- font id: 0
  58. -- text size: 12
  59. -- style flags: 0
  60. -- line height: 16
  61. -- part name: New Button
  62.  
  63.  
  64. -- part 19 (button)
  65. -- low flags: 00
  66. -- high flags: 0000
  67. -- rect: left=411 top=90 right=128 bottom=452
  68. -- title width / last selected line: 0
  69. -- icon id / first selected line: 15972 / 15972
  70. -- text alignment: 1
  71. -- font id: 0
  72. -- text size: 12
  73. -- style flags: 0
  74. -- line height: 16
  75. -- part name: Dates
  76. ----- HyperTalk script -----
  77. on mouseUp
  78.   global cdholder
  79.   put "go " & the id of this card & " of " & the name of this stack into cardID  --This holds the card ID of the card you're at
  80.   -- The following ask boxes put the current month and year in them
  81.   ask "Please enter month:" with word 2 of the long date
  82.   put it into monthName
  83.   if it is empty then exit mouseUp
  84.   ask "Please enter the year:" with word 4 of the long date
  85.   put it into yearName
  86.   if it is empty then exit mouseUp
  87.   repeat while it < 1821 or it > 2100
  88.     ask "The year must be 1821 through 2100..." with yearName
  89.     put it into yearName
  90.   end repeat
  91.   repeat  -- Verifies a correct month name has been entered
  92.     if monthName <> "January" then
  93.       if monthName <> "February" then
  94.         if monthName <> "March" then
  95.           if monthName <> "April" then
  96.             if monthName <> "May" then
  97.               if monthName <> "June" then
  98.                 if monthName <> "July" then
  99.                   if monthName <> "August" then
  100.                     if monthName <> "September" then
  101.                       if monthName <> "October" then
  102.                         if monthName <> "November" then
  103.                           if monthName <> "December" then
  104.                             -- Obviously an incorrest month name
  105.                             ask "Please check name of month..." with monthName
  106.                             put it into monthName
  107.                             next repeat  --Loops again to verify
  108.                           end if
  109.                         end if
  110.                       end if
  111.                     end if
  112.                   end if
  113.                 end if
  114.               end if
  115.             end if
  116.           end if
  117.         end if
  118.       end if
  119.     end if
  120.     exit repeat
  121.   end repeat
  122.   lock screen
  123.   go to card monthName of stack calendar
  124.   repeat with theLine = 1 to 7  --Each line is a day of the week
  125.     if yearName is in line theLine of card field monthName then
  126.       put theLine into Count
  127.       exit repeat
  128.     end if
  129.   end repeat
  130.   if Count = 1 then go to card Sunday
  131.   if Count = 2 then go to card Monday
  132.   if Count = 3 then go to card Tuesday
  133.   if Count = 4 then go to card Wednesday
  134.   if Count = 5 then go to card Thursday
  135.   if Count = 6 then go to card Friday
  136.   if Count = 7 then go to card Saturday
  137.   put the short name of this card into cdholder
  138.   put field days into dayHold
  139.   go to card display  --The card you will see
  140.   put dayHold into field days
  141.   put monthName into field month
  142.   put yearName into field year
  143.   hide field specials
  144.   hide field spclhedr
  145.   hide field bday
  146.   hide field evnt
  147.   --The next 2 ifs check for months with less than 31 days
  148.   if (monthName = "February") or (monthName = "April") or (monthName = "June") or (monthName = "September") or (monthName = "November") then
  149.     delete word "31" of field days
  150.   end if
  151.   if monthName = "February" then
  152.     delete word "30" of field days
  153.     if yearName mod 4 <> 0 or yearName = 1900 then
  154.       delete word "29" of field days
  155.     end if
  156.   end if
  157.   put cardID into field launch  --The card you started from
  158.   push card
  159.   do field launch  --Go back to where you came from
  160.   unlock screen
  161.   visual dissolve slow
  162.   pop card
  163. end mouseUp
  164.  
  165.  
  166.  
  167. -- part contents for card part 1
  168. ----- text -----
  169. by David McGregor     v1.4  Oct 16, 1989
  170.  
  171. -- part contents for card part 2
  172. ----- text -----
  173. This helpful aid will give you a look at any month of any year from 1821 through 2100.  Simply copy the button and paste it in whatever stack you like.  It will be faster if the stack "Calendar" is in the Home card folder.  You may also enter special events and birthdays to a particular month, and bring them up by clicking on         or the cake.
  174. (p.s. You need Helvetica 18 font and Hypercard version 1.2.1 or later.)
  175.       If you think this is a useful utility, it would inspire me if you would send what you think it is worth, (with any suggestions), to me at: Access Services -- P.O. Box 562 -- Chandler, AZ  85244. Or you can leave mail on GEnie for D.McGregor1, or CompuServe at 73627,732.
  176.  
  177. -- part contents for card part 4
  178. ----- text -----
  179. The Perpetual Calendar