home *** CD-ROM | disk | FTP | other *** search
- -- stack: in.6
- -- format: 8 (HyperCard 1)
- -- flags: 0x1000 (none)
- -- protect password hash: 0
- -- maximum user level: 5 (scripting)
- -- window: Rect(x1=0, y1=0, x2=0, y2=0)
- -- screen: Rect(x1=0, y1=0, x2=0, y2=0)
- -- card dimensions: w=0 h=0
- -- scroll: x=0 y=0
- -- background count: 3
- -- first background id: 2598
- -- card count: 26
- -- first card id: 3234
- -- list block id: 10937
- -- print block id: 0
- -- font table block id: 0
- -- style table block id: 0
- -- free block count: 31
- -- free size: 95712 bytes
- -- total size: 229376 bytes
- -- stack block size: 13824 bytes
- -- created by hypercard version: 0x01228000
- -- compacted by hypercard version: 0x01228000
- -- modified by hypercard version: 0x01228000
- -- opened by hypercard version: 0x01228000
- -- patterns[0]: 0x0000000000000000
- -- patterns[1]: 0x8000000008000000
- -- patterns[2]: 0x8800220088002200
- -- patterns[3]: 0x8888222288882222
- -- patterns[4]: 0x88AA22AA88AA22AA
- -- patterns[5]: 0xCCAA33AACCAA33AA
- -- patterns[6]: 0xEEAABBAAEEAABBAA
- -- patterns[7]: 0xEEBBBBEEEEBBBBEE
- -- patterns[8]: 0xFFBBFFEEFFBBFFEE
- -- patterns[9]: 0xFFBBFFFFFFBBFFFF
- -- patterns[10]: 0x8010022001084004
- -- patterns[11]: 0xFFFFFFFFFFFFFFFF
- -- patterns[12]: 0x8822882288228822
- -- patterns[13]: 0x1122448811224488
- -- patterns[14]: 0xC4800C6843023026
- -- patterns[15]: 0xB130031BD8C00C8D
- -- patterns[16]: 0xAA00AA00AA00AA00
- -- patterns[17]: 0x8822552288225522
- -- patterns[18]: 0x8855225588552255
- -- patterns[19]: 0x77DD77DD77DD77DD
- -- patterns[20]: 0x8000000000000000
- -- patterns[21]: 0xAA55AA55AA55AA55
- -- patterns[22]: 0x038448300C020101
- -- patterns[23]: 0x8244394482010101
- -- patterns[24]: 0x8814224188412214
- -- patterns[25]: 0x8080413E080814E3
- -- patterns[26]: 0x22048C7422179810
- -- patterns[27]: 0xBE808808EB088880
- -- patterns[28]: 0x25C8328964244C92
- -- patterns[29]: 0xA29C41BE2AC914EB
- -- patterns[30]: 0x40A00000040A0000
- -- patterns[31]: 0x8040200002040800
- -- patterns[32]: 0xAA00800088008000
- -- patterns[33]: 0xFF80808080808080
- -- patterns[34]: 0x081C22C180010204
- -- patterns[35]: 0xFF808080FF080808
- -- patterns[36]: 0xF87422478F172271
- -- patterns[37]: 0xBF00BFBFB0B0B0B0
- -- patterns[38]: 0xFF7FBE5DA2418000
- -- patterns[39]: 0xFAF5FAF5A050A050
- -- checksum: 0x0
- ----- HyperTalk script -----
- on saveBINHEX ENDSTRING
- global NewsState
- openascii
- ask "Anna nimi, jolle tämä BINHEX talletetaan."
- put it into BINHEXNIMI
- put false into OK
- repeat until OK
- get offset(":",BINHEXNIMI)
- if it > 0 then
- put "-" into char it of BINHEXNIMI
- put "Nimestä poistettu :-merkki. Nimi on nyt " & BINHEXNIMI
- else
- put true into OK
- end if
- end repeat
-
- if BINHEXNIMI is empty then
- exit saveBINHEX
- end if
-
- open file BINHEXNIMI
-
- repeat 60 times
-
- get offset("(This file must be converted with BinHex",card field 1)
- -- put "This must ...=" & it
- if it > 0 then
- select char 1 to it-1 of card field 1
- put empty into the selection -- of card field 1
- else
- put space into card field 1
- writeascii " "
- displayscreen "dis"
- end if
- end repeat
-
- repeat 10000 times
- get number of lines of card field 1
- put it into n
- repeat with i = 1 to n
- get line i of card field 1
- put it
- if offset("--MORE--",it) > 0 then exit repeat
- write it & return to file BINHEXNIMI
- end repeat
- get offset(ENDSTRING,card field 1)
- if it > 0 then exit repeat
- writeascii " "
- put empty into card field 1
- displayscreen "dis","--MORE--"
- end repeat
- close file BINHEXNIMI
- displayscreen "dis"
- closeascii
- put "BINHEX on talletettu HyperCard -kansioon nimelle" && BINHEXNIMI
- end saveBINHEX
-
- on closestack
- global CommSpeed,CommPrompt, NodeName, NodeType, Username
- openascii
- writeascii "stty rows 24" & return
- displayscreen dis,CommPrompt
- if NodeType is "unix" then
- writeascii "set term=vt200" & return
- else
- writeascii "wait 00:00:10" & return
- writeascii "set term/dev=vt200" & return
- end if
- displayscreen dis,CommPrompt
- answer "Terminal is now VT200"
- closeascii
- end closestack
-
- on talk text,p1,p2
- put text && p1 && p2
- Speak words,text
- end talk
-
- on SendField1
- global CommSpeed,CommPrompt, NodeName, NodeType, Username
- put zero into lsum
- put false into OK
- put 0 into count
- --deletedots
- repeat until OK
- put count+1 into count
- if count > 100 then exit repeat
- repeat with i = 1 to number of lines of card field 1
- get number of characters of line i of card field 1
- if it > 80 then
- --put "line " & i & " has " && it & " characters"
- --wait 1 sec
- set cursor to watch
- put 80 into ccc
- repeat with cc=1 to 20
- put 80-cc into k
- --put k & " " after message
- get character k of line i of card field 1
- --put it && " at pos " & k & " of line " & line i of card field 1
- --wait 2 sec
- if it is space then
- put k into ccc
- exit repeat
- end if
- end repeat
- --put "return to" && ccc && line i of card field 1
- --wait 2 sec
- put return after character ccc of line i of card field 1
- put false into OK
- exit repeat
- else
- put true into OK
- end if
- end repeat
- end repeat
- put number of lines of card field 1 into count
- repeat with i=1 to count
- writeascii line i of card field 1 & return
- end repeat
- end SendField1
-
- function getprompt p1,p2
- get first word of card field "Node Type" of card "Config"
- if it is "unix" then
- return p1
- else
- return p2
- end if
- end getprompt
-
- -- These handlers for Macintalk
- on MouseDown
- get the hilite of card button "Talk Target" of card "Config"
- if it is true then
- get the short name of the target
- put it into ShortName
-
- get the name of the target
- if second word of it is "field" then
- get first line of the value of the target
- --!!!!talk "Field" && ShortName & ":" && it, 100,120
- talk "Field" & ":" && it, 100,100
- else
- talk ShortName & ".",100,120
- end if
- end if
- end MouseDown
-
- on MouseLeave
- get the hilite of card button "Talk Target" of card "Config"
- if it is true and the ShiftKey is "down" then beep
- end mouseleave
-
- on MouseEnter
- if the OptionKey is "down" or the ShiftKey is "down" then
- get the hilite of card button "Talk Target" of card "Config"
- if it is true then
- get the short name of the target
- put it into ShortName
-
- get the name of the target
- if second word of it is "field" then
- if the OptionKey is "down" then
- get first line of the value of the target
- talk "Field" && ShortName & ":" && it, 100,120
- -- talk "Field" & ":" && it, 100,120
- end if
- else
- talk ShortName & ".",100,100
- end if
- end if
- end if
- end MouseEnter
- -- End Macintalk handlers
-
- on PANIC
- set cursor to watch
- openascii
- writeascii numtochar(3)
- wait 2 sec
- writeascii numtochar(3)
- wait 2 sec
- get first word of card field "Node Type" of card "Config"
- if it is "unix" then
- writeascii "x" & return
- writeascii "q" & return
- wait 1 sec
- writeascii "q"
- wait 1 sec
- writeascii "q"
- wait 1 sec
- writeascii "q" & return
- else
- writeascii "exit" & return
- end if
- go card "card1"
- put space into card field 1
- displayscreen
- closeascii
- end PANIC
-
- on SendMailX
- openascii
- get word 1 of card field "Node Type" of card "Config"
- put it into NodeType
- if NodeType is "unix" then
- get word 2 of line 3 of card field 1
- else
-
- get word 2 of line 2 of card field 1
- end if
-
- put it into osoite
- ask "Anna osoite (ellei tämä)" with osoite
- if NodeType = "unix" then
- writeascii "m " & it & return
- else
- writeascii "mail " & return
- writeascii "send " & return
- writeascii it & return
- end if
- get offset("Subject:",card field 1)
- get char it+8 to it+80 of card field 1
- put it into rivi
- get offset(return,rivi)
- get char 1 to it of rivi
- ask "Anna kirjeen aihe" with it
- put it into aihe
- writeascii aihe & return
- go card "MailSendX"
- closeascii
- end SendMAilX
-
- on ReadThemAll count
- get first word of card field "Node Type" of card "Config"
- put it into NodeType
- set cursor to watch
- repeat with i =1 to 10
- put "VANHA KIRJE" into card field "LineCount" of card "Letter" & i
- end repeat
- global MailNumber
- if NodeType is "unix" then
- put return & "& " into prompt
- repeat with MailNumber = 1 to count
- openascii
- put "Kirje numero" && MailNumber
- go card "Letter" & MailNumber
- put space into card field 1
- writeascii MailNumber & return
- writeascii "d" & return
- displayscreen "dis",prompt
- get name of card
- put date() && it into card field "LineCount"
- closeascii
- end repeat
-
- else
- openascii
- put "MAIL>" into prompt
- repeat with MailNumber = 1 to count
- put "Kirje numero" && MailNumber
- writeascii MailNumber & return
- writeascii "extract" & " MacMail_" & MailNumber & ".txt" & return
- writeascii "d" & return
- put space into card field 1
- displayscreen "dis",prompt
- end repeat
- writeascii "exit" & return
- writeascii "purge MacMail*.*" & return
- displayscreen "flush"
- repeat with MailNumber = 1 to count
- put "Kirje numero" && MailNumber
- go card "Letter" & MailNumber
- put space into card field 1
- writeascii "type/nopage MacMail_" & MailNumber & ".txt" & return
- put space into card field 1
- displayscreen
- get name of card
- put date() && it into card field "LineCount"
- end repeat
- closeascii
- end if
-
- put "Kirjeet haettu pinoon, voit nyt selailla niitä."
- end ReadThemAll
-
- on openstack
- global XonXoff
- global CommSpeed,CommPrompt, NodeName, NodeType, Username
- put true into XonXoff
-
- get the hilite of card button "Speed1200" of card "Config"
- if it is true then put "1200" into CommSpeed
- get the hilite of card button "Speed2400" of card "Config"
- if it is true then put "2400" into CommSpeed
- get the hilite of card button "Speed9600" of card "Config"
- if it is true then put "9600" into CommSpeed
- get the hilite of card button "Speed19200" of card "Config"
- if it is true then put "19200" into CommSpeed
-
- put empty into card field 1
- -- hide card field 1 of card "card1"
- put "**** PAINA NAPPULAA" && quote & "AVAA YHTEYS" & quote & " ****" into card field "UserMessage"
- get card field "username" of card "config"
- put it into Username
- put it & space into card field "Connection"
- get card field "Node Name" of card "config"
- put it into a
- put it into NodeName
- get card field "Node Type" of card "config"
- put it into NodeType
- put a && it after card field "Connection"
- --send SetBoud to card "card1"
- if NodeType is "unix" then
- put "% " into CommPrompt
- else
- put return & "$ " into CommPrompt
- end if
- end openstack
-
- function Tidyit P1
- get number of characters of P1
- put it into count
- repeat with i = 1 to count
- if char i of P1 = "." or char i of p1 = "!" then
- put space after char i of P1
- put count+1 into count
- end if
-
- end repeat
-
- if char 1 to 7 of P1 is "Resent-" then
- return empty
- end if
- if char 1 to 7 of P1 is "Receive" then
- return empty
- end if
- if char 1 to 7 of P1 is "X-vms-t" then
- return empty
- end if
- -- if char 1 to 5 of P1 is "From:" then
- -- return empty
- -- end if
- if char 1 to 4 of P1 is "From" then
- return empty
- end if
- if char 1 to 3 of P1 is "To:" then
- return empty
- end if
- if char 1 to 11 of P1 is "Newsgroups:" then
- return empty
-
- end if
- if char 1 to 11 of P1 is "References:" then
- return empty
-
- end if
- if char 1 to 8 of P1 is "Message-" then
- return empty
-
- end if
- if char 1 to 3 of P1 is "Cc:" then
- return empty
-
- end if
- if char 1 to 6 of P1 is " id aa" then
- return empty
-
- end if
- if char 1 to 8 of P1 is "in-reply" then
- return empty
-
- end if
- if char 1 to 8 of P1 is "X-mailer" then
- return empty
-
- end if
- return P1
- end Tidyit
-
- on ReadField1
- get number of lines of card field 1
- put it into count
- repeat with i = 1 to count
- get line i of card field 1
- put tidyit(it) into it
- put it
- -- wait 10
- if it is not empty then talk it ,120,100
- if the Mouse is "down" then exit repeat
- end repeat
- end ReadField1
-
- function clickLine
- return ((the mouseV + the scroll of the target - item 2 of the rect of the target-4) div the textheight of the target) + 1
- end clickLine
-
- on deletedots
- replace numtochar(138) ,"{" -- ae
- replace numtochar(140) ,"}" -- ruots
- replace numtochar(154) ,"|" -- oe
- replace numtochar(128) ,"[" -- AE
- replace numtochar(129) ,"]" -- RUOTS
- replace numtochar(133) ,"\" -- OE
- end deletedots
-
- on delextedots
- replace quote & numtochar(138) & quote,"{" -- ae
- replace quote & numtochar(140) & quote,"}" -- ruots
- replace quote & numtochar(154) & quote,"|" -- oe
- replace quote & numtochar(128) & quote,"[" -- AE
- replace quote & numtochar(129) & quote,"]" -- RUOTS
- replace quote & numtochar(133) & quote,"\" -- OE
- end delextedots
-
- on replace a,b
- put 1 into AE
- repeat until AE = 0
- set cursor to busy
- put offset(a,card field 1) into AE
- if AE = 0 then exit repeat
- put b into character AE of card field 1
- -- put "Replacing " & a & " with " & b & "."
- end repeat
- end replace
-
- on displayscreen y,wstr,wstr2
- global commstorage
- global LastInput
- global StringGot
- global XonXoff
- set scroll of card field 1 to 0
- put false into StringGot
- if XonXoff then writeascii (numtochar(17))
- put 900 into i
- put 0 into ex
- -- put "?" into card field "LineCount"
- -- put space into card field 1
- repeat for i
- set cursor to busy
- put commf("read") into x
- if x is empty then
- put 1 + ex into ex
- else
- put 0 into ex
- put x after card field 1
- get number of lines of card field 1
- put "Lines " & it into card field "LineCount"
- put it into lastline
- if it > 500 then
- writeascii numtochar(3) & numtochar(19)
- put "THIS TEXT IS TOO LONG. CANNOT BE SAVED INTO FIELD."
- end if
- put x into LastInput
- -- put last line of card field 1
- if wstr is not empty then
- --if lastline > 2 then
- if wstr is in line lastline-1 to lastline of card field 1 then
- put true into StringGot
- exit displayscreen
- end if
- if wstr2 is not empty then
- if wstr2 is in line lastline-1 to lastline of card field 1 then
- put true into StringGot
- exit displayscreen
- end if
- end if
- --end if
- end if
- end if
- if ex > 65 then
- exit repeat
- end if
- end repeat
- if y is "flush" then
- put space into card field 1
- end if
-
- end displayscreen
-
- on openascii
- global CommStorage
- global CommSpeed
-
- put commf("open" & CommSpeed) into x
- -- put commf("open") into x
- -- put commf("open","modem","1200","1","no","8") into x
-
- end openascii
-
- on closeascii
- global CommStorage
- put commf("close") into x
- end closeascii
-
- on writeascii x
- global CommStorage
- put commf("write",x) into x
- end writeascii
-
- on readascii
- global CommStorage
- get commf("read")
- end readascii
-
- on MailDirectory
- global DirectoryGot
- global CommStorage
- go card "MailDir"
-
- if not DirectoryGot then
- put space into card field 1
- openascii
- get first word of card field "Node Type" of card "config"
- if it is "vms" then
- writeascii (numtochar(17) & "dir" & return)
- put "MAIL>" into prompt
- end if
- if it is "unix" then
- writeascii (numtochar(17) & "h" & return)
- put return & "& " into prompt
- end if
- displayscreen "dis",prompt
- if offset("No applicable messages",card field 1) > 0 then
- put "no mail" into card field 1
- go card "MailDir"
- end if
-
- put number of lines of card field 1 into i
- repeat with a = 1 to i
- delete char 78 to 130 of line a of card field 1
- end repeat
-
- put true into DirectoryGot
- closeascii
- end if
-
- end MailDirectory
-
-
-
-
-
-