home *** CD-ROM | disk | FTP | other *** search
- 'T:Weather.EBS for CompuServe
- ' VA 4.01 release
-
- Global Const IM_DELETE = 2048
-
- Declare Function ParseString(args As String, delim As String) As String
- Declare Function StartCapture(pseudo As String)
- Declare Function QueueFile(service As String, sfilename As String, queueflags As Long) As Boolean
- Declare Sub ResetForum
- Declare Function FileUrl(fn As String) As String
-
- 'T:WeatherLink (subroutine) (CompuServe)
- Sub WeatherLink(subj As String, fn As String)
- Dim tmpfn As String, b As Boolean
-
- tmpfn = StartCapture("Weather/Maps CompuServe")
- CaptureText subj+Basic.Eoln$
- CaptureText Basic.Eoln$+"Downloaded to "+FileUrl(fn)+Basic.Eoln$
- CaptureText "!end"+Basic.Eoln$
- Capture CAPTURE_OFF
- b = QueueFile(Session.Service, tmpfn, IM_DELETE)
- End Sub
-
- 'T:LocalWeather (subroutine) (CompuServe)
- Sub LocalWeather(id As String)
- Dim filename As String
-
- ' Start from a known place that works
- GoTop
- GoTop
- Comms.Send "weather\r"
- WaitFor "weather\r"
- filename = StartCapture("Weather/Local_Weather CompuServe")
- WaitFor "\nEnd of report !"
-
- ' Clear up
- CaptureRewind 16
- CaptureText Basic.Eoln$+"!end"+Basic.Eoln$
- Capture CAPTURE_OFF
- Comms.Send "\r"
- WaitForPrompt "Prompt"
-
- ' Add to import queue
- If QueueFile(Session.Service, filename, IM_DELETE) Then
- ReportSuccess id & " : Local weather report collected"
- End If
- End Sub
-
- 'T:USWeather (subroutine) (CompuServe)
- Sub USWeather(id As String, map As String)
-
- menuitem = ParseString(map, " ") 'menuitem = "15"
- fname = ParseString(map, " ") 'fname = "NEUS"
-
- Comms.Send "go cis:usmaps\r"
- WaitForPrompt "Prompt"
- Comms.Send "go cis:usmaps\r"
- WaitFor "\n"
- Terminal.Status "Entering Weather Area ... Please Wait"
- Terminal.Enabled=False
- WaitForPrompt "PromptMain"
- Terminal.Status "Selecting Weather Map ... Please Wait"
- Comms.Send "1\r"
- WaitForPrompt "Prompt"
- Comms.Send menuitem + "\r"
- WaitForPrompt "PromptMain"
- Comms.Send "2\r"
- WaitFor "(<CR> for default) :"
- Comms.Send fname + ".gif\r"
- WaitForPrompt "Prompt"
- Terminal.Enabled=True
- WeatherLink "US Weather Map", fname+".gif"
-
- ReportSuccess id & " US Weather Map " & map & " collected"
- End Sub
-
- 'T:WorldWeather (subroutine) (CompuServe)
- Sub WorldWeather(id as String, map as String)
-
- menuitem = ParseString(map, " ") 'menuitem = "15"
- fname = ParseString(map, " ") 'fname = "NEUS"
-
- 'General go to usmaps and get to other regions
- Comms.Send "go cis:usmaps\r"
- WaitForPrompt "Prompt"
- Comms.Send "go cis:usmaps\r"
- WaitFor "\n"
- Terminal.Status "Entering Weather Area ... Please Wait"
- Terminal.Enabled=False
- WaitForPrompt "PromptMain"
- Comms.Send "1\r"
- Terminal.Status "Selecting Weather Map ... Please Wait"
- WaitForPrompt "Prompt"
- Comms.Send "3\r"
- WaitForPrompt "Prompt"
-
- Comms.SendLiteral menuitem
- Comms.Send "\r"
- WaitForPrompt "PromptMain"
- Terminal.Status "Preparing to Download File(s) ... Please Wait"
-
- 'Determine which country from number to be passed
- 'Each country has a different series of maps, but all europe is same number
-
- Select Case menuitem
-
- '2 Canada
- Case 2
- Comms.Send "3\r"
- WaitForPrompt "Prompt"
- Comms.Send "2\r"
- WaitFor "(<CR> for default) :"
- Comms.Send fname + "sat.gif"+"\r"
- WaitForPrompt "Prompt"
- WeatherLink "Canada Weather Map", "sat.gif"
-
- Comms.Send "4\r"
- WaitFor "(<CR> for default) :"
- Comms.Send "pacsat.gif"+"\r"
- WaitForPrompt "Prompt"
- WeatherLink "Canada Weather Map", "pacsat.gif"
-
- Comms.Send "5\r"
- WaitFor "(<CR> for default) :"
- Comms.Send fname + "curr.gif"+"\r"
- WaitForPrompt "Prompt"
- WeatherLink "Canada Weather Map", "curr.gif"
-
- Comms.Send "6\r"
- WaitFor "(<CR> for default) :"
- Comms.Send fname + "for.gif"+"\r"
- WaitForPrompt "Prompt"
- WeatherLink "Canada Weather Map", "for.gif"
-
- ReportSuccess id & " : Canada Weather Map collected"
-
- 'European
- Case 3,4,5,6,7,8,9,10
- Comms.Send "3\r"
- WaitForPrompt "Prompt"
- Comms.Send "2\r"
- WaitFor "(<CR> for default) :"
- Comms.Send fname + "curr.gif"+"\r"
- WaitForPrompt "Prompt"
- WeatherLink "European Weather Map", "curr.gif"
-
- Comms.Send "4\r"
- WaitFor "(<CR> for default) :"
- Comms.Send fname + "for.gif"+"\r"
- WaitForPrompt "Prompt"
- WeatherLink "European Weather Map", "for.gif"
-
- Comms.Send "5\r"
- WaitFor "(<CR> for default) :"
- Comms.Send "eursat.gif"+"\r"
- WaitForPrompt "Prompt"
- WeatherLink "European Weather Map", "eursat.gif"
-
- Comms.Send "6\r"
- WaitFor "(<CR> for default) :"
- Comms.Send "eurcurr.gif"+"\r"
- WaitForPrompt "Prompt"
- WeatherLink "European Weather Map", "eurcurr.gif"
-
- Comms.Send "7\r"
- WaitFor "(<CR> for default) :"
- Comms.Send "eurfor.gif"+"\r"
- WaitForPrompt "Prompt"
- WeatherLink "European Weather Map", "eurfor.gif"
-
- ReportSuccess id & " : European Weather Map collected"
-
- 'Middle East
- Case 11
- Comms.Send "3\r"
- WaitForPrompt "Prompt"
- Comms.Send "2\r"
- WaitFor "(<CR> for default) :"
- Comms.Send "mesat.gif"+"\r"
- WaitForPrompt "Prompt"
- WeatherLink "Middle East Weather Map", "mesat.gif"
-
- ReportSuccess id & " : Middle East Weather Map collected"
-
-
- 'Japan
- Case 12
- Comms.Send "3\r"
- WaitForPrompt "Prompt"
- Comms.Send "2\r"
- WaitFor "(<CR> for default) :"
- Comms.Send "japsat.gif"+"\r"
- WaitForPrompt "Prompt"
- WeatherLink "Japan Weather Map", "japsat.gif"
-
- Comms.Send "4\r"
- WaitFor "(<CR> for default) :"
- Comms.Send "japcurr.gif"+"\r"
- WaitForPrompt "Prompt"
- WeatherLink "Japan Weather Map", "japcurr.gif"
-
- Comms.Send "5\r"
- WaitFor "(<CR> for default) :"
- Comms.Send "japfor.gif"+"\r"
- WaitForPrompt "Prompt"
- WeatherLink "Japan Weather Map", "japfor.gif"
-
- ReportSuccess id & " : Japan Weather Map collected"
-
- 'Australia
- Case 13
- Comms.Send "3\r"
- WaitForPrompt "Prompt"
- Comms.Send "2\r"
- WaitFor "(<CR> for default) :"
- Comms.Send "eaussat.gif"+"\r"
- WaitForPrompt "Prompt"
- WeatherLink "Australia Weather Map", "eaussat.gif"
-
- Comms.Send "4\r"
- WaitFor "(<CR> for default) :"
- Comms.Send "waussat.gif"+"\r"
- WaitForPrompt "Prompt"
- WeatherLink "Australia Weather Map", "waussat.gif"
-
- Comms.Send "5\r"
- WaitFor "(<CR> for default) :"
- Comms.Send "auscurr.gif"+"\r"
- WaitForPrompt "Prompt"
- WeatherLink "Australia Weather Map", "auscurr.gif"
-
- Comms.Send "6\r"
- WaitFor "(<CR> for default) :"
- Comms.Send "ausfor.gif"+"\r"
- WaitForPrompt "Prompt"
- WeatherLink "Australia Weather Map", "ausfor.gif"
-
- ReportSuccess id & " : Australia Weather Map collected"
-
- 'Mexico
- Case 14
- Comms.Send "3\r"
- WaitForPrompt "Prompt"
- Comms.Send "2\r"
- WaitFor "(<CR> for default) :"
- Comms.Send "pacsat.gif"+"\r"
- WaitForPrompt "Prompt"
- WeatherLink "Mexico Weather Map", "pacsat.gif"
- ReportSuccess id & " : Mexico Weather Map collected"
-
- Case Else
- ReportFailure id
-
- End Select
-
- Terminal.Enabled=True
- End Sub
-
- 'T:SevereWarning (subroutine) (CompuServe)
- Sub SevereWarning(id As String, warning As String)
-
- Dim filename As String
- menuitem = ParseString(warning, " ") 'menuitem = 3 char code
-
- ResetForum
- GoTop
- Comms.Send "go cis:wea\r"
- WaitFor "hoice!"
-
- Comms.Send "sw " + menuitem + "\r"
- Terminal.Status "Collecting Severe Weather Report"
- Terminal.Enabled = False
- WaitFor "sw "
- filename = StartCapture("Weather/Severe_Weather CompuServe")
- WaitFor "ID:"
-
- ' Clear up
- CaptureRewind 3
- CaptureText Basic.Eoln$+"!end"+Basic.Eoln$
- Capture CAPTURE_OFF
- Comms.Send "exit\r"
- Terminal.Enabled = True
- WaitForPrompt "Prompt"
-
- ' Add to import queue
- If QueueFile(Session.Service, filename, IM_DELETE) Then
- ReportSuccess id & " : Severe Weather information collected"
- End If
- End Sub
-
-
- 'T:ExtStateWeather (subroutine) (CompuServe)
- Sub StateWeather(id As String, where As String)
-
- Dim filename As String
-
- state=UCase$(where)
-
- ResetForum
- Comms.Send "go cis:wea\r"
- WaitFor "hoice!"
-
- Comms.Send "ef " + state + "\r"
- Terminal.Status "Collecting State Weather Report"
- Terminal.Enabled = False
- WaitFor "ef "
- filename = StartCapture("Weather/State_Weather CompuServe")
- WaitFor "ID:"
-
- ' Clear up
- CaptureRewind 3
- CaptureText Basic.Eoln$+"!end"+Basic.Eoln$
- Capture CAPTURE_OFF
- Comms.Send "exit\r"
- Terminal.Enabled = True
- WaitForPrompt "Prompt"
-
- ' Add to import queue
- If QueueFile(Session.Service, filename, IM_DELETE) Then
- ReportSuccess id & " : State (" & where & ") weather collected"
- End If
- End Sub
-
-