home *** CD-ROM | disk | FTP | other *** search
/ Otherware / Otherware_1_SB_Development.iso / mac / hypercar / fun / astroalm.sit / Almanac / card_10200.txt < prev    next >
Text File  |  1989-10-15  |  4KB  |  173 lines

  1. -- card: 10200 from stack: in
  2. -- bmap block id: 10246
  3. -- flags: 0000
  4. -- background id: 6859
  5. -- name: meteor
  6. ----- HyperTalk script -----
  7. on openCard
  8.   hide cd fld data
  9.   put "("& word 4 of the long date&")" into cd fld year
  10. end openCard
  11.  
  12. on mcalc
  13.   get word 4 of the long date
  14.   if it Γëá last word of cd fld data then meteor
  15. end mcalc
  16.  
  17. on meteor
  18.   global h,m
  19.   put "                              " into spaces
  20.   if cd fld meteors is not empty then
  21.     select text of cd fld meteors
  22.     doMenu "Clear Text"
  23.   end if
  24.   put number of lines of cd fld data into lin
  25.   repeat with i=1 to lin-1
  26.     put line i of cd fld data into mdat
  27.     put item 1 of mdat into shower
  28.     put item 2 of mdat into s0
  29.     put item 3 of mdat into s1
  30.     put item 4 of mdat into j5
  31.     put word 4 of the long date into y
  32.     put y into line lin of cd fld data
  33.     put number of chars of shower into nch
  34.     put word 4 of the long date into y
  35.     put (y-1950)/100 into t5
  36.     put s0+t5*(s1+1.39663+.0003*t5) mod 360 into s
  37.     put j5+t5*(36525.636+s1) into j
  38.     repeat 2
  39.       set cursor to busy
  40.       put (j+17980)/36525 into t
  41.       put 279.7+t*(36000.769+.0003*t) into l
  42.       put 358.48+t*(35999.05-.0002*t)into m
  43.       put (l+sind(m)*(1.92-.005*t)+.02*sind(2*m)) mod 360 into s5
  44.       subtract (s5-s)/(.986+.033*cosd(m)) from j
  45.     end repeat
  46.     put (j+16519.5-DSTCheck()/24) into jd
  47.     put jd*86400 into sec
  48.     put sec - sec mod 1 into sec
  49.     convert sec to dateItems
  50.     get char 2 to 4 of last word of line 4 of cd fld coords of cd 1
  51.     if item 2 of sec<4 or item 2 of sec>10 then put "S" into char 2 of it
  52.     convert sec to long date
  53.     put jd mod 1 * 24 into arg
  54.     hm false,arg
  55.     put shower&& char 1 to (18-nch) of spaces & sec && "at"&&h &":"& m && it into line i of cd fld meteors
  56.   end repeat
  57. end meteor
  58.  
  59.  
  60. -- part 1 (field)
  61. -- low flags: 00
  62. -- high flags: 0000
  63. -- rect: left=29 top=77 right=273 bottom=457
  64. -- title width / last selected line: 0
  65. -- icon id / first selected line: 0 / 0
  66. -- text alignment: 0
  67. -- font id: 15036
  68. -- text size: 12
  69. -- style flags: 0
  70. -- line height: 16
  71. -- part name: meteors
  72.  
  73.  
  74. -- part 2 (field)
  75. -- low flags: 80
  76. -- high flags: 0007
  77. -- rect: left=30 top=79 right=319 bottom=293
  78. -- title width / last selected line: 0
  79. -- icon id / first selected line: 0 / 0
  80. -- text alignment: 0
  81. -- font id: 3
  82. -- text size: 12
  83. -- style flags: 0
  84. -- line height: 16
  85. -- part name: Data
  86.  
  87.  
  88. -- part 3 (button)
  89. -- low flags: 00
  90. -- high flags: 0004
  91. -- rect: left=465 top=118 right=158 bottom=508
  92. -- title width / last selected line: 0
  93. -- icon id / first selected line: 4450 / 4450
  94. -- text alignment: 1
  95. -- font id: 0
  96. -- text size: 12
  97. -- style flags: 0
  98. -- line height: 16
  99. -- part name: New Button
  100. ----- HyperTalk script -----
  101. on mouseUp
  102.   meteor
  103. end mouseUp
  104.  
  105.  
  106.  
  107. -- part 4 (field)
  108. -- low flags: 00
  109. -- high flags: 0000
  110. -- rect: left=335 top=41 right=72 bottom=414
  111. -- title width / last selected line: 0
  112. -- icon id / first selected line: 0 / 0
  113. -- text alignment: 0
  114. -- font id: 14991
  115. -- text size: 24
  116. -- style flags: 0
  117. -- line height: 32
  118. -- part name: year
  119.  
  120.  
  121. -- part 5 (button)
  122. -- low flags: 00
  123. -- high flags: 8003
  124. -- rect: left=348 top=21 right=37 bottom=428
  125. -- title width / last selected line: 0
  126. -- icon id / first selected line: 0 / 0
  127. -- text alignment: 1
  128. -- font id: 0
  129. -- text size: 12
  130. -- style flags: 0
  131. -- line height: 16
  132. -- part name: Show Data
  133. ----- HyperTalk script -----
  134. on mouseUp
  135.   if short name of me contains "Show" then
  136.     set name of me to "Hide Data"
  137.     show cd fld data
  138.   else
  139.     set name of me to "Show Data"
  140.     hide cd fld data
  141.   end if
  142. end mouseUp
  143.  
  144.  
  145.  
  146. -- part contents for card part 2
  147. ----- text -----
  148. Quadrantids,282.9,-.4,285.3
  149. Lyrids,31.7,.06,393.9
  150. Eta Aquariids,44,0.3,406.6
  151. Delta Aquariids,125,-1,491.2
  152. Perseids,139.2,.03,506
  153. Orionids,207.7,.4,576.2
  154. Taurids,220,.44,588.5
  155. Leonids,234.3,1.5,602.7
  156. Geminids,261.4,0,629.5
  157. 1989
  158.  
  159. -- part contents for card part 4
  160. ----- text -----
  161. (1989)
  162.  
  163. -- part contents for card part 1
  164. ----- text -----
  165. Quadrantids        Tuesday, January 3, 1989 at 12:16 EST
  166. Lyrids             Saturday, April 22, 1989 at 6:09 EDT
  167. Eta Aquariids      Friday, May 5, 1989 at 0:13 EDT
  168. Delta Aquariids    Friday, July 28, 1989 at 2:01 EDT
  169. Perseids           Saturday, August 12, 1989 at 7:56 EDT
  170. Orionids           Saturday, October 21, 1989 at 15:48 EDT
  171. Taurids            Thursday, November 2, 1989 at 23:52 EST
  172. Leonids            Friday, November 17, 1989 at 15:11 EST
  173. Geminids           Wednesday, December 13, 1989 at 19:11 EST