home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Otherware
/
Otherware_1_SB_Development.iso
/
mac
/
hypercar
/
fun
/
astroalm.sit
/
Almanac
/
card_7837.txt
< prev
next >
Wrap
Text File
|
1989-10-15
|
8KB
|
358 lines
-- card: 7837 from stack: in
-- bmap block id: 8910
-- flags: 0000
-- background id: 2765
-- name: Occult.
----- HyperTalk script -----
on fetchOcc he
global doo,oldit,she,today,moon
if moon=0 then exit fetchOcc
put empty into oldit
put 2 into las
put false into done
if he is empty then exit fetchOcc
put word 1 of he && word 2 of he into she
get char 2 of word 2 of last line of cd fld total
if it is "/" then subtract 1 from las
put word 1 of last line of cd fld total && char 1 to las of word 2 of last line of cd fld total into today
if not((today is in she) and (she is in today)) or doo=1 then
-- import text
if number of chars of he=5 then put space after char 3 of he
-- put proper path name here...
-- If you have a custom file, set it up like the example provided.
-- otherwise ... delete this card. Also, I am working on a Moon
-- RA and Dec. script.
put "Hard Disk:Astronomy:Oc-" & last word of the long date into fileName
if the shiftKey is up and number of lines of cd fld total Γëá 0 then
select text of cd fld total
doMenu "Clear Text"
end if
open file fileName
put the ticks into t0
repeat
set cursor to busy
read from file fileName until "&"
if it is empty then
exit repeat
end if
delete last char of it
if it contains he then
exit repeat
else
-- put he && char 6 to 7 of line 3 of it
if first word of he is in it and second word of he< char 6 to 7 of line 3 of it then
put true into done
exit repeat
end if
end if
put it into oldit
end repeat
if done then
close file fileName
put " No totals for this date." into line 6 of cd fld total
exit fetchOcc
end if
close file fileName
put the ticks into t1
put number of lines of oldit into nlines
put 0 into prevday
if getday(it)-getday(oldit)=1 then
repeat with i=3 to nlines
if char 9 to 10 of line i of oldit >=20 then
put i into oldi
repeat with i=oldi to nlines
put "*" into char 1 of line i of oldit
end repeat
put return & line oldi to nlines of oldit after line 2 of it
exit repeat
end if
end repeat
end if
if hilite of button 3 then
put the number of lines of it into num
if num=0 then exit fetchOcc
put line 1 to 2 of it & return into cd fld total
repeat with i=3 to num
if (char 16 of line i of it)>=char 1 of cd fld Filter then
put line i of it & return after cd fld total
end if
end repeat
put 1 into j
else
put it after cd fld total
put -1 into j
end if
get the number of lines of cd fld total
if it > 0 then put " (" & it-3+j && "totals)" after line 1 of cd fld total
put " "& rnd10((t1-t0)/60) &" s." after line 1 of cd fld total
find "STAR"
repeat until ": " is not in cd fld total
find string ": " in fld total
put "put ""e&":0""e&&"into" && the foundChunk into command
do command
end repeat
end if
end fetchOcc
function getday arg
get char 6 to 7 of line 3 of arg
return it
end getday
on openCard
show btn Print
set textFont of cd fld total to Courier
pass openCard
end openCard
on closeCard
hide btn Print
pass closeCard
end closeCard
-- part 1 (field)
-- low flags: 00
-- high flags: 0007
-- rect: left=37 top=98 right=262 bottom=389
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 0
-- font id: 15036
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: total
-- part 3 (button)
-- low flags: 00
-- high flags: 8003
-- rect: left=290 top=313 right=334 bottom=371
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Other Days
----- HyperTalk script -----
on mouseUp
Ask "Enter date (mon dd):"
put it into he
fetchOcc he
end mouseUp
-- part 6 (button)
-- low flags: 00
-- high flags: 8003
-- rect: left=6 top=313 right=334 bottom=87
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Today
----- HyperTalk script -----
on mouseUp
global doo,dodoo
put char 1 to 3 of second word of nDate(1,12,0) && first word of nDate(1,12,0) into he
if dodoo=1 then put 1 into doo
fetchOcc he
put 0 into doo
end mouseUp
-- part 7 (button)
-- low flags: 00
-- high flags: C006
-- rect: left=230 top=76 right=95 bottom=307
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Filter >=
----- HyperTalk script -----
on mouseUp
global doo,dodoo
set hilite of me to not hilite of me
put 1 into dodoo
send mouseUp to btn today
put 0 into dodoo
end mouseUp
-- part 8 (button)
-- low flags: 80
-- high flags: 2004
-- rect: left=182 top=304 right=342 bottom=227
-- title width / last selected line: 0
-- icon id / first selected line: 15844 / 15844
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Print
----- HyperTalk script -----
on mouseUp
printField cd fld 1,"Courier"
end mouseUp
-- part 9 (button)
-- low flags: 00
-- high flags: A003
-- rect: left=90 top=313 right=334 bottom=171
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Tomorrow
----- HyperTalk script -----
on mouseUp
global doo
put 1 into doo
put char 1 to 3 of second word of nDate(1,12,1) && first word of nDate(1,12,1) into he
fetchOcc he
put 0 into doo
end mouseUp
-- part 10 (field)
-- low flags: 00
-- high flags: 0000
-- rect: left=298 top=76 right=93 bottom=326
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Filter
-- part 11 (field)
-- low flags: 80
-- high flags: 0001
-- rect: left=43 top=224 right=255 bottom=278
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 0
-- font id: 3
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: mr
-- part 12 (field)
-- low flags: 80
-- high flags: 0001
-- rect: left=43 top=259 right=295 bottom=278
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 0
-- font id: 3
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: ms
-- part 13 (field)
-- low flags: 80
-- high flags: 0004
-- rect: left=13 top=40 right=205 bottom=360
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 0
-- font id: 3
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: data
-- part contents for background part 7
----- text -----
Sidereal Time = 21:18
21.3103726
-- part contents for background part 6
----- text -----
Universal Time = 1:15
1.2633333
200
-- part contents for background part 31
----- text -----
Julian Date = 2447815.553
-- part contents for background part 14
----- text -----
Occult.
-- part contents for background part 10
----- text -----
Occult. R.A. = 17h 59m
Occult. Dec. = 0┬░ 00'
below W horizon
269.813
0
-- part contents for background part 13
----- text -----
Occult. Rises at 5:28 AM
Occult. Sets at 5:28 PM
47.471
5.471
17.471
-- part contents for background part 28
----- text -----
16 October 1989 (JT)
-- part contents for background part 39
----- text -----
98%-
-- part contents for card part 10
----- text -----
3
-- part contents for card part 13
----- text -----
-3785 -.680872521 0.208333333
-5.80579963
0.283656922
57.451297137
-3784.791666667
-- part contents for card part 1
----- text -----
RATING FOR OCT 16 = .26 (3 totals) 1.5 s.
DATE T(UT) PR STAR # MAG PCT MN SN CA
OCT 16/ 1:20 R3 0357 8.0 98- 22 82N
OCT 16/ 5:33 R3 X03455 7.9 97- 71 90S
OCT 16/ 7:36 R4 0387 6.9 97- 71 56N