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

  1. -- card: 3076 from stack: in
  2. -- bmap block id: 7383
  3. -- flags: 0000
  4. -- background id: 2765
  5. -- name: Jupiter
  6. ----- HyperTalk script -----
  7. on openCard
  8.   global force
  9.   calc (the number of words of fld "ra cheb"),force
  10.   put char 1 to 3 of second word of nDate(1,12,0) && first word of nDate(1,12,0) into he
  11.   if not((second word of he) = first word of fld "date") or force=1 then fetch he
  12.   pass openCard
  13. end openCard
  14.  
  15. on fetch he
  16.   global found
  17.   put false into found
  18.   put "JAN,FEB,MAR,APR,MAY,JUN,JUL,AUG,SEP,OCT,NOV,DEC" into months
  19.   if he is empty then exit fetch
  20.   if number of chars of he=5 then put "0" after char 4 of he
  21.   -- import text  put proper pathname here
  22.   put "Hard Disk:Astronomy:GE-" & last word of the long date into fileName
  23.   repeat with month=1 to 12
  24.     if item month of months is in he then exit repeat
  25.   end repeat
  26.   if the shiftKey is up and number of lines of cd fld total Γëá 0 then
  27.     select text of cd fld total
  28.     doMenu "Clear Text"
  29.   end if
  30.   put month&char 5 to 6 of he into tar
  31.   open file fileName
  32.   repeat
  33.     set cursor to busy
  34.     read from file fileName until "&"
  35.     if it is empty then
  36.       exit repeat
  37.     end if
  38.     delete last char of it
  39.     if it contains tar then
  40.       exit repeat
  41.     end if
  42.     if tar < char 4 to 7 of line 2 of it then
  43.       get empty
  44.       exit repeat
  45.     end if
  46.   end repeat
  47.   close file fileName
  48.   put the number of lines of it into she
  49.   if she = 0 then
  50.     -- next search
  51.     if not (the target contains "Next") then put "No Galilean Satellite Events for this date." into line 3 of cd fld total
  52.     exit fetch
  53.   end if
  54.   if not (the target contains "Next") then
  55.     put line 1 of it && return into cd fld total
  56.     put "DATE   Time(UT) SP Radii" & return into line 2 of cd fld total
  57.   end if
  58.   repeat with i=2 to she
  59.     put "(not visible)" into temp
  60.     put word 3 of line i of it into time
  61.     put (char 1 to 2 of time+(char 4 to 5 of time)/60+24-DSTcheck()) mod 24 into time
  62.     put line 4 of fld rise of cd sun + .5 into str
  63.     put line 5 of fld rise of cd sun - .5 into sts
  64.     put (line 4 of fld rise + .5) mod 24 into jr
  65.     put (line 5 of fld rise - .5) mod 24 into js
  66.     if time <str or time >sts then
  67.       if jr < 12  then
  68.         if time >jr and time <js then
  69.           put empty into temp
  70.         end if
  71.       else
  72.         if time <jr and time >js then
  73.           put empty into temp
  74.         end if
  75.       end if
  76.     end if
  77.     if (the target contains "Next" and temp is empty and cd fld total is empty) then
  78.       put line 1 of it && return&"DATE   Time(UT) SP Radii" & return into  cd fld total
  79.     end if
  80.     if not(the target contains "Next") or (the target contains "Next" and temp is empty) then put item month of months&&char 5 to 6 of he&&word 3 of line i of it &&" "&word 1 of line i of it&&(word 4 of line i of it)/10 && temp & return after cd fld total
  81.     if temp is empty then put true into found
  82.   end repeat
  83. end fetch
  84.  
  85.  
  86. -- part 16 (button)
  87. -- low flags: 00
  88. -- high flags: 0000
  89. -- rect: left=398 top=181 right=205 bottom=437
  90. -- title width / last selected line: 0
  91. -- icon id / first selected line: 31949 / 31949
  92. -- text alignment: 1
  93. -- font id: 0
  94. -- text size: 12
  95. -- style flags: 0
  96. -- line height: 16
  97. -- part name: Satellite
  98. ----- HyperTalk script -----
  99. on mouseUp
  100.   get the seconds
  101.   add DSTcheck()*3600 to it
  102.   convert it to dateitems
  103.   put item 1 of it into line 3 of joe
  104.   put item 2 of it into line 1 of joe
  105.   put item 3 of it +(item 4 of it)/24 + (item 5 of it)/1440 into line 2 of joe
  106.   PutClipboard(joe)
  107.   open "JSAT"
  108. end mouseUp
  109.  
  110.  
  111.  
  112. -- part 18 (field)
  113. -- low flags: 00
  114. -- high flags: 0007
  115. -- rect: left=41 top=184 right=282 bottom=348
  116. -- title width / last selected line: 0
  117. -- icon id / first selected line: 0 / 0
  118. -- text alignment: 0
  119. -- font id: 15036
  120. -- text size: 12
  121. -- style flags: 0
  122. -- line height: 16
  123. -- part name: total
  124.  
  125.  
  126. -- part 19 (button)
  127. -- low flags: 00
  128. -- high flags: 8003
  129. -- rect: left=6 top=313 right=334 bottom=87
  130. -- title width / last selected line: 0
  131. -- icon id / first selected line: 0 / 0
  132. -- text alignment: 1
  133. -- font id: 0
  134. -- text size: 12
  135. -- style flags: 0
  136. -- line height: 16
  137. -- part name: Today
  138. ----- HyperTalk script -----
  139. on mouseUp
  140.   put char 1 to 3 of second word of nDate(1,12,0) && first word of nDate(1,12,0) into he
  141.   fetch he
  142. end mouseUp
  143.  
  144.  
  145.  
  146. -- part 20 (button)
  147. -- low flags: 00
  148. -- high flags: 8003
  149. -- rect: left=283 top=313 right=334 bottom=364
  150. -- title width / last selected line: 0
  151. -- icon id / first selected line: 0 / 0
  152. -- text alignment: 1
  153. -- font id: 0
  154. -- text size: 12
  155. -- style flags: 0
  156. -- line height: 16
  157. -- part name: Other Days
  158. ----- HyperTalk script -----
  159. on mouseUp
  160.   Ask "Enter date (mon dd):"
  161.   put it into he
  162.   fetch he
  163. end mouseUp
  164.  
  165.  
  166.  
  167. -- part 21 (button)
  168. -- low flags: 00
  169. -- high flags: A003
  170. -- rect: left=90 top=313 right=334 bottom=171
  171. -- title width / last selected line: 0
  172. -- icon id / first selected line: 0 / 0
  173. -- text alignment: 1
  174. -- font id: 0
  175. -- text size: 12
  176. -- style flags: 0
  177. -- line height: 16
  178. -- part name: Tomorrow
  179. ----- HyperTalk script -----
  180. on mouseUp
  181.   put char 1 to 3 of second word of nDate(1,12,1) && first word of nDate(1,12,1) into he
  182.   fetch he
  183. end mouseUp
  184.  
  185.  
  186.  
  187.  
  188. -- part 22 (button)
  189. -- low flags: 00
  190. -- high flags: 8003
  191. -- rect: left=375 top=313 right=334 bottom=460
  192. -- title width / last selected line: 0
  193. -- icon id / first selected line: 0 / 0
  194. -- text alignment: 1
  195. -- font id: 0
  196. -- text size: 12
  197. -- style flags: 0
  198. -- line height: 16
  199. -- part name: Next Event
  200. ----- HyperTalk script -----
  201. on mouseUp
  202.   global found
  203.   put 0 into n
  204.   put false into found
  205.   repeat until found
  206.     add 1 to n
  207.     put char 1 to 3 of word 2 of nDate(1,12,n) && word 1 of nDate(1,12,n) into he
  208.     fetch he
  209.   end repeat
  210. end mouseUp
  211.  
  212.  
  213.  
  214.  
  215. -- part contents for background part 7
  216. ----- text -----
  217. Sidereal Time = 20:54
  218. 20.907328
  219.  
  220. -- part contents for background part 8
  221. ----- text -----
  222. 10.532373 1.7509241 -.2889554 -.4065956 .0168502 .0121559 .0117863 .0065057 .0004711 .0000428 -.0003972 -.0001867 -.0000491 -.000006
  223.  
  224. -- part contents for background part 9
  225. ----- text -----
  226. 42.843489 2.483478 -.956244 -.040251 .491389 -.106798 -.066149 -.002379 -.001812 .004352 .001587 .00038 .0 -.000172
  227.  
  228. -- part contents for background part 10
  229. ----- text -----
  230. Jupiter R.A. = 6h 45m
  231. Jupiter Dec.  = +22┬░ 45'
  232. below E horizon
  233.  
  234. 101.4934753
  235. 22.7620765
  236.  
  237. -- part contents for background part 6
  238. ----- text -----
  239. Universal Time = 00:51
  240. 0.861389
  241. 288
  242.  
  243. -- part contents for background part 13
  244. ----- text -----
  245. Jupiter Rises at 11:40 PM
  246. Jupiter Sets  at 1:49 PM
  247. 30.7481537
  248. 23.6700821
  249. 13.8262253
  250.  
  251. -- part contents for background part 14
  252. ----- text -----
  253. Jupiter
  254.  
  255. -- part contents for background part 31
  256. ----- text -----
  257. Julian Date = 2447815.536
  258.  
  259. -- part contents for background part 28
  260. ----- text -----
  261. 16 October 1989 (JT)
  262.  
  263. -- part contents for background part 39
  264. ----- text -----
  265.  98%-
  266.  
  267. -- part contents for card part 18
  268. ----- text -----
  269. JUPITER SATELLITE ECLIPSE EVENTS 
  270. DATE   Time(UT) SP Radii
  271. OCT 16 11:45.3  1D 1.1 
  272.