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

  1. -- card: 9537 from stack: in
  2. -- bmap block id: 10919
  3. -- flags: 0000
  4. -- background id: 6859
  5. -- name: Conjunct
  6. ----- HyperTalk script -----
  7. on openCard
  8.   put line 1 of cd fld date into line 2 of cd fld date
  9.   put the date into line 1 of cd fld date
  10.   if line 1 of cd fld date Γëá line 2 of cd fld date then conj
  11. end openCard
  12.  
  13. on conj
  14.   hide message box
  15.   global ra,dec
  16.   put "Mercury,Venus,Mars,Jupiter,Saturn,Uranus,Neptune" into planet
  17.   set lockScreen to true
  18.   set lockMessages to true
  19.   go card Mercury
  20.   put number of this cd into c1
  21.   go recent cd
  22.   set lockScreen to false
  23.   set lockMessages to false
  24.   put cd fld threshhold into thresh
  25.   put 0 into k
  26.   put empty into cd fld conj
  27.   put c1+6 into c2
  28.   repeat with i=c1 to c2
  29.     set cursor to busy
  30.     put line 5 of fld Pos of cd i into item i-c1+1 of ra
  31.     put line 6 of fld Pos of cd i into item i-c1+1 of dec
  32.   end repeat
  33.   repeat with i=1 to 6
  34.     repeat with j=i+1 to 7
  35.       get sqrt((item i of ra - item j of ra)^2+ (item i of dec - item j of dec)^2)
  36.       if it <thresh then
  37.         if it<1 then get trunc(it*100)/100
  38.         else
  39.           get trunc(it*10)/10
  40.         end if
  41.         add 1 to k
  42.         set numberFormat to "0.0#"
  43.         put item i of planet &&"and"&& item j of planet && "will be" &&"separated by "&&it&&"degrees." into line k of cd fld conj
  44.         set numberFormat to "0.######"
  45.       end if
  46.       set cursor to busy
  47.     end repeat
  48.   end repeat
  49. end conj
  50.  
  51. on enterInField
  52.   conj
  53. end enterInField
  54.  
  55. on returnInField
  56.   conj
  57. end returnInField
  58.  
  59.  
  60.  
  61.  
  62. -- part 1 (field)
  63. -- low flags: 00
  64. -- high flags: 0000
  65. -- rect: left=356 top=299 right=323 bottom=448
  66. -- title width / last selected line: 0
  67. -- icon id / first selected line: 0 / 0
  68. -- text alignment: 0
  69. -- font id: 14860
  70. -- text size: 18
  71. -- style flags: 0
  72. -- line height: 24
  73. -- part name: Date
  74.  
  75.  
  76. -- part 6 (field)
  77. -- low flags: 02
  78. -- high flags: 0000
  79. -- rect: left=363 top=51 right=70 bottom=393
  80. -- title width / last selected line: 0
  81. -- icon id / first selected line: 0 / 0
  82. -- text alignment: 1
  83. -- font id: 15009
  84. -- text size: 12
  85. -- style flags: 0
  86. -- line height: 16
  87. -- part name: Threshhold
  88.  
  89.  
  90. -- part 3 (field)
  91. -- low flags: 00
  92. -- high flags: 0002
  93. -- rect: left=29 top=77 right=297 bottom=457
  94. -- title width / last selected line: 0
  95. -- icon id / first selected line: 0 / 0
  96. -- text alignment: 0
  97. -- font id: 14843
  98. -- text size: 14
  99. -- style flags: 0
  100. -- line height: 18
  101. -- part name: conj
  102.  
  103.  
  104. -- part 16 (button)
  105. -- low flags: 00
  106. -- high flags: 0004
  107. -- rect: left=467 top=118 right=155 bottom=504
  108. -- title width / last selected line: 0
  109. -- icon id / first selected line: 26516 / 26516
  110. -- text alignment: 1
  111. -- font id: 0
  112. -- text size: 12
  113. -- style flags: 0
  114. -- line height: 16
  115. -- part name: conj
  116. ----- HyperTalk script -----
  117. on mouseUp
  118.   conj
  119. end mouseUp
  120.  
  121.  
  122.  
  123. -- part contents for card part 1
  124. ----- text -----
  125. 10/15/89
  126. 10/15/89
  127.  
  128. -- part contents for card part 6
  129. ----- text -----
  130. 10
  131.  
  132. -- part contents for card part 3
  133. ----- text -----
  134. Saturn and Uranus will be separated by  6.9 degrees.
  135. Saturn and Neptune will be separated by  1.6 degrees.
  136. Uranus and Neptune will be separated by  8.6 degrees.