home *** CD-ROM | disk | FTP | other *** search
/ .net 1999 December / netCD65.iso / pc / Software / VirtualA / 32bit / vasetup.exe / %MYDIR% / COMMANDS.EBS < prev    next >
Encoding:
Text File  |  1999-10-06  |  18.8 KB  |  538 lines

  1. 'T:COMMANDS.EBS for CompuServe
  2. ' VA 4.52 release
  3.  
  4. Declare Function ParseString(args As String, delim As String) As String
  5. Declare Function QueueFile(service As String, sfilename As String, queueflags As Long) As Boolean
  6.  
  7. Const IM_DELETE = 2048      ' Delete scratchpad file afterwards?
  8.  
  9. Public DownloadDir As String    'where downloads go
  10. Public WorkingPath As String    'added to speed up Fetch stuff online
  11. Public WhereAmI As String        'name of last forum/page etc
  12. Public Sysop As Boolean            'are we a sysop?
  13. Public InAscii As Boolean
  14. Public LocalHMN As Boolean
  15.  
  16. Dim lastprompt As String    'Tracker name of the last prompt encountered
  17. Dim lastmatch As String     'Tracker match text of the last prompt encountered
  18. Dim MailSubject As String   'Subject for current mail message
  19. Dim MailFilename As String  'Filename for current mail message
  20. Dim Success As Boolean  'Whether command succeeded
  21. Dim Failure As String       'Reason command failed (error message)
  22. Dim sctrack As Tracker      'Success/Failure tracker
  23. Dim BellSet As Boolean      'do we have ^G prompt set?
  24. Dim nummessages As Integer
  25. Dim LastDownMessages As String
  26. Dim LastFailure As String   'last forum we failed going to
  27. Dim binfname As String
  28. Dim binfrom As String
  29. Dim billingproblem As Boolean   'workaround CIS switching into 7bit mode
  30. Dim SetHighMessage As Boolean
  31.  
  32. Declare Function UniqueFileName$
  33. Declare Function MyDate$
  34. Declare Sub SetHighMessageNumber
  35.  
  36. 'T:Main - CIS (subroutine) (CompuServe) (CompuServe)
  37. 'Entry point. Does a complete blink
  38. Sub Main
  39.     On Error Goto Main_error
  40.     If Instr(Command$, "debug") Then
  41.         ViewportOpen
  42.         Capture CAPTURE_ON
  43.         Print "Current Directory = "; CurDir$
  44.     End If
  45.  
  46.     Trackers.DefaultIgnoreCase = False
  47.     Trackers.DefaultWildcard = False
  48.     InAscii = False
  49.  
  50.     ' Default download dir
  51.     DownloadDir = ReadIni$("Service "+Session.Service, "Download Directory", Session.IniFilename)
  52.     AddBackSlash DownloadDir
  53.  
  54.     ' added this to use in RemoteSearch
  55.     WorkingPath = ReadIni$("Service "+Session.Service, "Work Path", Session.IniFileName)
  56.     AddBackSlash WorkingPath
  57.  
  58.     LocalHMN = StrComp(ReadIni$("Service "+Session.Service, "Local HMN", Session.IniFileName), "YES", 1)=0
  59.  
  60.     'Create the cis.rep file
  61.     StartReportFile
  62.     LogResult "CompuServe connection Started " + MyDate$ + " (" + _
  63.         ReadIni$(Session.IniSection, "Description", Session.IniFileName)+ ")"
  64.     Terminal.Log = True
  65.     Terminal.Print "Started at " + MyDate$ + Basic.Eoln$
  66.  
  67.     LoadExtraLibraries
  68.     LoadAddonLibraries
  69.     SetUpStandardTrackers
  70.  
  71.     HMIMain
  72.  
  73.     LogResult "CompuServe connection Finished " + MyDate$
  74.     Terminal.Print "Finished at " + MyDate$ + Basic.Eoln$
  75.     'Close and queue the cis.rep file
  76.     EndReportFile
  77.     Exit Sub
  78. Main_error:
  79.     LogResult "Error:" + Str$(Err) + " in line " + Str$(Erl) + ":" + Error$
  80.     LogResult "CompuServe connection Failed " + MyDate$
  81.     'Close and queue the cis.rep file
  82.     EndReportFile
  83. End Sub
  84.  
  85. ' Load the other libraries
  86. Sub LoadExtraLibraries
  87.     LoadScript "hmibase.ebs"
  88.     LoadScript "hmimail.ebs"
  89.     LoadScript "hmiforum.ebs"
  90.     LoadScript "hmilib.ebs"
  91.     LoadScript "hmisysop.ebs"
  92.     LoadScript "basic.ebs"
  93.     LoadScript "billing.ebs"
  94.     LoadScript "ens.ebs"
  95.     LoadScript "exec.ebs"
  96.     LoadScript "online.ebs"
  97.     LoadScript "sysop.ebs"
  98.     LoadScript "sysop2.ebs"
  99.     LoadScript "sysoplib.ebs"
  100.     LoadScript "weather.ebs"
  101.     LoadScript "ziff.ebs"
  102.     LoadScript "obsolete.ebs"
  103.  
  104.     ' User created scripts should go into user.ebs
  105.     LoadScript "user.ebs"
  106. End Sub
  107.  
  108. 'T:LookupForum (subroutine) (CompuServe)
  109. Function LookupForum(forum As String) As String
  110.     Dim newforum As String
  111.  
  112.     newforum = ReadIni$("Forum Lookup", forum, Session.ServicePath+"userlist.ini")
  113.     If newforum="" Then
  114.         newforum = ReadIni$("Forum Lookup", forum, Session.ServicePath+"list.ini")
  115.     End If
  116.     'LogResult "Forum Lookup: "+forum+" -> "+newforum
  117.     If newforum="" Then
  118.         LookupForum = forum
  119.     Else
  120.         LookupForum = newforum
  121.     End If
  122. End Function
  123.  
  124. 'T:ResetForum (subroutine) (CompuServe)
  125. ' Clears the current forum - so the next GoForum() does it
  126. Sub ResetForum
  127.     WhereAmI = ""
  128.     Sysop = False
  129. End Sub
  130.  
  131. 'T:SectionNumber (function) (CompuServe)
  132. 'Returns section number as a string or "" if nothing there
  133. Function SectionNumber(ByVal section As String)
  134.     Dim i% As Integer
  135.     Dim tsection As String
  136.  
  137.     SectionNumber = ""
  138.     i% = InStr(section, "/S", 1)
  139.     If i%=0 Then i% = InStr(section, "/L", 1)
  140.     If i%<>0 Then
  141.         tsection = Mid(section, i%+2)
  142.         i% = InStr(tsection, "_")
  143.         If i% = 0 Then i% = InStr(tsection, " ")
  144.         If i%<>0 Then
  145.             SectionNumber = Mid(tsection, 1, i%-1)
  146.         Else
  147.             SectionNumber = tsection
  148.         End If
  149.     End If
  150. End Function
  151.  
  152. 'T:ForumName (function) (CompuServe)
  153. 'Returns forum name part of forum/section or "" if nothing there
  154. Function ForumName(ByVal forum As String) As String
  155.     ForumName = ParseString(forum, "/")
  156. End Function
  157.  
  158. 'T:StartCapture (subroutine) (CompuServe)
  159. ' Opens capture file and sticks header it it
  160. Function StartCapture(pseudo As String)
  161.     Dim filename As String
  162.  
  163.     filename = UniqueFilename$()
  164.     Capture CAPTURE_ON, filename
  165.     CaptureText Basic.Eoln$+"!start "+pseudo+Basic.Eoln$
  166.     StartCapture = filename
  167. End Function
  168.  
  169. Sub ReplaceAllInString(txt As String, search As String, replace As String)
  170.     Dim i As Integer, s As Integer, r As Integer
  171.  
  172.     s = Len(search)
  173.     r = Len(replace)
  174.     i = Instr(txt, search)
  175.     While i > 0
  176.         If s = r Then
  177.             Mid$(txt, i, s) = replace
  178.         Else
  179.             txt = Left$(txt, i - 1) + replace + Mid$(txt, i + s)
  180.         End If
  181.         i = Instr(i + r, txt, search)
  182.     Wend
  183. End Sub
  184.  
  185. Sub ReplaceAnyInString(txt As String, search As String, replace As String)
  186.     Dim i As Integer, s As Integer
  187.  
  188.     s = Len(txt)
  189.     For i = 1 To s
  190.         If Instr(search, Mid$(txt, i, 1)) Then
  191.             Mid$(txt, i, 1) = replace
  192.         End If
  193.     Next
  194. End Sub
  195.  
  196. 'T:QueFetches (subroutine) (CompuServe)
  197. 'added this should make the Fetch process faster and neater
  198. Sub QueFetches
  199.    Dim c as Boolean, Fetchfilename As String
  200.    
  201.    Fetchfilename = WorkingPath + "mswfetch.tmp"
  202.  
  203.    If FileExists(Fetchfilename) Then
  204.        If FileLen(Fetchfilename) > 0 Then
  205.            c = QueueFile(Session.Service, Fetchfilename, IM_DELETE)
  206.        Else
  207.            DeleteFile Fetchfilename
  208.        End If
  209.    End If
  210. End Sub
  211.  
  212. Function FullErrorMessage() As String
  213.     FullErrorMessage = err & " in line " & erl & ":" & Error$
  214. End Function
  215.  
  216. 'T:Standard Trackers for CompuServe
  217. 'The standard CIS trackers
  218. Sub SetUpStandardTrackers()
  219.     Dim t As Tracker
  220.  
  221.     Set t = CreateTracker("PromptChoice1", "\nEnter choice!", "", True)
  222.     Set t = CreateTracker("PromptChoice2", "\nEnter choice !", "", True)
  223.     Set t = CreateTracker("PromptEnter", "\nPress <CR> !")
  224.     Set t = CreateTracker("BadCommand", "\nI don't recognize that command.")
  225.     Set t = CreateTracker("PromptNextOrChoice", "\nPress <CR> for next or type CHOICES !")
  226.     Set t = CreateTracker("PromptMain", "\n!")
  227.     Set t = CreateTracker("PromptForum", "\nForum !")
  228.     Set t = CreateTracker("PromptMessages", "\nMessages !")
  229.     Set t = CreateTracker("PromptAction", "\nRead action !")
  230.     Set t = CreateTracker("PromptOK", "\nOK")
  231.     Set t = CreateTracker("PromptPost", "\nPost action !")
  232.     Set t = CreateTracker("PromptNumber1", "\nEnter choice number!")
  233.     Set t = CreateTracker("PromptNumber2", "\nEnter choice number !")
  234.     Set t = CreateTracker("PromptMail", "\nMail!")
  235.     Set t = CreateTracker("PromptLibrary", "\nLIB ")
  236.     Set t = CreateTracker("PromptAdditional", "\nDo you wish additional information (Y or N)!", "SendNo")
  237.     Set t = CreateTracker("PromptMore", "\nMORE !", "SendCR")
  238.     Set t = CreateTracker("PromptMore2", Chr$(19)+Chr$(13)+Chr$(0)+Chr$(0)+Chr$(0)+Chr$(0)+"PAGE", "SendCR")
  239.     Set t = CreateTracker("PromptMore3", Chr$(13)+"PAGE", "SendCR")
  240.     Set t = CreateTracker("PromptAdd", "ADDress or HELp")
  241.     Set t = CreateTracker("PromptEmpty1", "\nThat page is empty !")
  242.     Set t = CreateTracker("PromptEmpty2", "\nThat page is empty!")
  243.     Set t = CreateTracker("PromptLast", "\nLast page, enter choice!")
  244.     Set t = CreateTracker("PromptDelete", "Delete these messages\? (Y or N)!")
  245.     Set t = CreateTracker("PromptSend1", "SEND!")
  246.     Set t = CreateTracker("PromptSend2", "User ID):")
  247.     Set t = CreateTracker("PromptLastPage1", "\nLast Page!", "", True)
  248.     Set t = CreateTracker("PromptLastPage2", "\nLast Page !", "", True)
  249.     Set t = CreateTracker("PromptSO1", "\nSO !", "", True)
  250.     Set t = CreateTracker("PromptSO2", "\nMembership Maintenance !", "", True)
  251.     Set t = CreateTracker("PromptSO3", "\nMaintenance !", "", True)
  252. End Sub
  253.  
  254. 'T:SetStandardOptions (subroutine) (CompuServe)
  255. Sub SetStandardOptions
  256.     Comms.AutoDownload = PROT_QUICKB
  257.     Comms.Send "set width 79\r"
  258.     WaitForPrompt "Prompt"
  259. End Sub
  260.  
  261. 'T:SuccessMatched (subroutine) (CompuServe)
  262. 'Tracker procedure called if the success tracker is hit
  263. Sub SuccessMatched(t As Tracker)
  264.     Print "SuccessMatched :"; t.Name; "="; t.Match
  265.     Success = True
  266.     t.reset
  267. End Sub
  268.  
  269. 'T:FailureMatched (subroutine) (CompuServe)
  270. 'Tracker procedure called if the failure tracker is hit
  271. 'The match string is stored in the Failure variable for showing to the user
  272. Sub FailureMatched(t As Tracker)
  273.     Print "FailureMatched :"; t.Name; "="; t.Match
  274.     Success = False
  275.     Failure = Failure + t.Match
  276.     t.reset
  277. End Sub
  278.  
  279. 'T:TrackSuccess (subroutine) (CompuServe)
  280. 'Set up a success tracker to match pattern s
  281. 'If the tracker isn't matched, we will report defaulterr
  282. Sub TrackSuccess(s As String, defaulterr As String)
  283.     If sctrack Is Not Nothing Then sctrack.delete
  284.     Set sctrack = CreateTracker("sctrack", s, "SuccessMatched")
  285.     Success = False
  286.     Failure = defaulterr
  287. End Sub
  288.  
  289. 'T:TrackFailure (subroutine) (CompuServe)
  290. 'Set up a failure tracker to match pattern s
  291. 'If it is matched, the match string will be stored in the Failure variable
  292. Sub TrackFailure(s As String)
  293.     If sctrack Is Not Nothing Then sctrack.delete
  294.     If s<>"" Then
  295.         Set sctrack = CreateTracker("sctrack", s, "FailureMatched")
  296.         Success = True
  297.         Failure = ""
  298.     End If
  299. End Sub
  300.  
  301. 'T:ReportSuccessFlag (subroutine) (CompuServe)
  302. 'At the end of the command, report whether it succeeded
  303. 'Assumes either TrackSuccess or TrackFailure has been called at start
  304. Sub ReportSuccessFlag(id As String)
  305.     If sctrack Is Not Nothing Then sctrack.delete
  306.     If Success Then
  307.         ReportSuccess id
  308.     Else
  309.         ReportFailure id, Failure
  310.     End If
  311. End Sub
  312.  
  313. 'T:PromptMatches (function) (CompuServe) (CompuServe)
  314. 'Check if the last prompt tracker name matches prefix
  315. Function PromptMatches(prefix As String)
  316.     PromptMatches = (Left$(lastprompt, len(prefix)) = prefix)
  317. End Function
  318.  
  319. 'T:TimedWaitForPrompt(subroutine) (CompuServe)
  320. 'Timed wait for a prompt whose tracker name matches prefix
  321. Sub TimedWaitForPrompt(prefix As String, timeout As Integer)
  322.     Dim t As Tracker
  323.  
  324.     Print "WaitForPrompt "; prefix
  325.     Trackers.Reset
  326.     Do
  327.         Set t = Wait(10 * timeout)
  328.         lastprompt = t.Name
  329.         lastmatch = t.Match
  330.         t.reset
  331.     Loop Until PromptMatches(prefix)
  332. End Sub
  333.  
  334. 'T:WaitForPrompt (subroutine) (CompuServe)
  335. 'Wait 4 mins for a prompt whose tracker name matches prefix
  336. Sub WaitForPrompt(prefix As String)
  337.     TimedWaitForPrompt prefix, 240
  338. End Sub
  339.  
  340. 'T:GoTop (subroutine) (CompuServe)
  341. ' Go to the top menu
  342. Sub GoTop
  343.     If SetHighMessage Then
  344.         Comms.Send "high;l\r"
  345.         WaitForPrompt "Prompt"
  346.         SetHighMessage = False
  347.     End If
  348.     ResetForum
  349.     Comms.Send "go cis:top\r"
  350.     WaitForPrompt "Prompt"
  351. End Sub
  352.  
  353. 'T:SetSysop (subroutine) (global)
  354. Sub SetSysop(t As Tracker)
  355.     Print "Matched:"; t.name
  356.     t.reset
  357.     Sysop = True
  358. End Sub
  359.  
  360. 'T:GoForum (function) (CompuServe)
  361. ' Intelligently GO forum/page etc
  362. Function GoForum(ByVal forum As String) As Boolean
  363.     Dim go1 As Tracker, go2 As Tracker, go3 As Tracker, go4 As Tracker
  364.     Dim go5 As Tracker, go6 As Tracker, go7 As Tracker, go8 As Tracker
  365.     Dim go9 As Tracker, go10 As Tracker, go11 As Tracker, go12 As Tracker
  366.     Dim go13 As Tracker, go14 As Tracker, go15 As Tracker, go16 As Tracker
  367.     Dim go17 As Tracker, go18 As Tracker, go19 As Tracker, go20 As Tracker
  368.     Dim go21 As Tracker, go22 As Tracker, go23 As Tracker, go24 As Tracker
  369.     Dim go25 As Tracker, go26 As Tracker, go27 As Tracker, go28 As Tracker
  370.     Dim go29 As Tracker, go30 As Tracker, go31 As Tracker, t As Tracker
  371.     Dim sysop1 As Tracker, sysop2 As Tracker, sysop3 As Tracker
  372.     Dim filename As String, b As Boolean
  373.  
  374.     ' Mangle the forum name a bit
  375.     forum = ParseString(forum, "/")
  376.     If Instr(forum, ":")=0 Then
  377.         forum = "cis:"+forum
  378.     End If
  379.  
  380.     ' Use the lookup table to auto-convert menus to forums.
  381.     ' eg. 'PCPLUS' -> 'PCPFORUM'
  382.     forum = LookupForum(forum)
  383.  
  384.     ' Sort out any switch between ascii/hmi
  385.     If InAscii=False Then
  386.         SetHighMessageNumber
  387.         ResetForum
  388.         InAscii = True
  389.     End If
  390.  
  391.     ' If we're already here then do nothing
  392.     If WhereAmI <> forum Then
  393.         GoForum = False
  394.  
  395.         ' If we failed last time then we're just gonna fail again
  396.         If LastFailure=forum Then
  397.             Exit Function
  398.         End If
  399.         BellSet = False
  400.         On Error Goto GoForum_error
  401.         If SetHighMessage Then
  402.             Comms.Send "high;l\r"
  403.             WaitForPrompt "Prompt"
  404.             SetHighMessage = False
  405.         End If
  406.         Trackers.Delete 'disable all trackers
  407.         ResetForum
  408.  
  409.         Set go1 = CreateTracker("GoPromptForum1", "\nForum !", "")
  410.         Set go3 = CreateTracker("GoMore1", "\nMORE !", "SendCR")
  411.         Set go4 = CreateTracker("GoPromptMenu", "\n!", "")
  412.         Set go5 = CreateTracker("GoUnavailable1", "\n? Service is temporarily unavailable", "")
  413.         Set go6 = CreateTracker("GoUnavailable2", "\n% ENS is temporarily unavailable due to hardware problems.", "")
  414.         Set go7 = CreateTracker("GoUnavailable3", "\n?*is temporarily unavailable", "", False, True)
  415.         Set go8 = CreateTracker("GoUnavailable4", "Capacity limit exceeded, please try later", "")
  416.         Set go9 = CreateTracker("GoUnavailable5", "INSTOF Tempcore OPEN failure", "")
  417.         Set go10= CreateTracker("GoUnavailable6", "This Forum is temporarily\nclosed for maintenance.", "")
  418.         Set go11= CreateTracker("GoUnavailable7", "\n% Forum is at maximum capacity", "")
  419.         Set go12= CreateTracker("GoUnavailable8", "\n?? LOGTWO - Cannot take more than 2 minutes to Log-in", "")
  420.         Set go13= CreateTracker("GoUnavailableHMI1", "\nYour communications software is not able to access this product", "")
  421.         Set go14= CreateTracker("GoUnavailableHMI2", "\nRequested page is empty. Key T for top!", "")
  422.         Set go15= CreateTracker("GoUnavailableHMI3", "\nCIM Only Product   GGG-292", "")
  423.         Set go16= CreateTracker("GoPressCR1", "\nPress <CR> !", "SendCR")
  424.         Set go17= CreateTracker("GoPressCR2", "\nPress <CR> to continue :", "SendCR")
  425.         Set go18= CreateTracker("GoUnknown1", "\n* is unrecognized!", "", False, True)
  426.         Set go19= CreateTracker("GoUnknown2", "\nUnknown service error!", "")
  427.         Set go20= CreateTracker("GoPromptIssue1", "\n\rIssue:")
  428.         Set go21= CreateTracker("GoPromptIssue2", "\nIssue:")
  429.         Set go22= CreateTracker("GoPromptCommodity1", "\n\rCommodity:")
  430.         Set go23= CreateTracker("GoPromptCommodity2", "\nCommodity:")
  431.         Set go24= CreateTracker("GoPromptCompany1", "\n\rCompany:")
  432.         Set go25= CreateTracker("GoPromptCompany2", "\nCompany:")
  433.         Set go26= CreateTracker("GoEmpty", "\nThat page is empty!")
  434.         Set go27= CreateTracker("GoNewsflash", "\nNews Flash:")
  435.         Set go28= CreateTracker("GoEnterChoice1", "\nEnter choice!")
  436.         Set go29= CreateTracker("GoEnterChoice2", "\nEnter choice !")
  437.         Set go30= CreateTracker("GoMore2", Chr$(19)+Chr$(13)+Chr$(0)+Chr$(0)+Chr$(0)+Chr$(0)+"PAGE", "SendCR")
  438.         Set go31= CreateTracker("GoMore3", Chr$(13)+"PAGE", "SendCR")
  439.         Set sysop1 = CreateTracker("GoLibNeeded", "\nThe following Libraries need attention:")
  440.         Set sysop2 = CreateTracker("GoLibNoBlocks", "\nThe Forum Libraries have No Blocks")
  441.         Set sysop3 = CreateTracker("GoSysop", "\nGreetings, SYSOP!", "SetSysop")
  442.  
  443.         ' Try to go
  444.         WhereAmI = ""
  445.         Comms.Send "go " + forum + "\r"
  446.         WaitForPrompt "Go"
  447.  
  448.         ' Capture the newsflash
  449.         If PromptMatches("GoNewsflash") Then
  450.             filename = StartCapture(forum+"/Newsflash CompuServe")
  451.             CaptureText "News Flash"+Basic.Eoln$
  452.             WaitForPrompt "Go"
  453.             CaptureRewind 7
  454.             CaptureText Basic.Eoln$+"!end"+Basic.Eoln$
  455.             Capture CAPTURE_OFF
  456.             b = QueueFile(Session.Service, filename, IM_DELETE)
  457.         End If
  458.  
  459.         ' Capture the library attention messages
  460.         If PromptMatches("GoLib") Then
  461.             sysop1.Active = False
  462.             sysop2.Active = False
  463.             filename = StartCapture(forum+"/Sysop_Logs Library_Attention")
  464.             CaptureText lastmatch
  465.             WaitForPrompt "Go"
  466.             CaptureRewind 7
  467.             CaptureText Basic.Eoln$+"!end"+Basic.Eoln$
  468.             Capture CAPTURE_OFF
  469.             b = QueueFile(Session.Service, filename, IM_DELETE)
  470.         End If
  471.  
  472.         ' Check for a ^G prompt
  473.         If PromptMatches("GoPromptForum1") Then
  474.             On Error Resume Next
  475.             Set t = Wait(2)
  476.         End If
  477.  
  478.         Terminal.Status "GoForum: "+forum
  479.         On Error Goto 0
  480.         Trackers.delete
  481.         SetupStandardTrackers
  482.  
  483.         ' Handle the prompt
  484.         If PromptMatches("GoUnavailable") Then
  485.             LastFailure = forum
  486.             SetHighMessage = False
  487.             If PromptMatches("GoUnavailable1") Then
  488.                 WaitFor "continue:"
  489.                 GoTop
  490.             Else
  491.                 If PromptMatches("GoUnavailableHMI") Then
  492.                     ' Oops!  A HMI forum
  493.                     filename = StartCapture(forum+"/Newsflash CompuServe")
  494.                     CaptureText "New Forum Information"+Basic.Eoln$
  495.                     CaptureText "Virtual Access is currently not able to access this forum. Ashmount"+Basic.Eoln$
  496.                     CaptureText "Research is currently working to rapidly bring this service back to you."+Basic.Eoln$+Basic.Eoln$
  497.  
  498.                     CaptureText "In the mean time you can use the CompuServe Information Manager"+Basic.Eoln$
  499.                     CaptureText "available in GO CIMSOFT forum."+Basic.Eoln$+Basic.Eoln$
  500.  
  501.                     CaptureText "More details about this new forum product is available in GO NEWFORUM."+Basic.Eoln$
  502.                     CaptureText "If you have any questions, GO FEEDBACK or send mail to CompuServe"+Basic.Eoln$
  503.                     CaptureText "Customer Service at 70006,101."+Basic.Eoln$
  504.                     CaptureText "!end"+Basic.Eoln$
  505.                     Capture CAPTURE_OFF
  506.                     b = QueueFile(Session.Service, filename, IM_DELETE)
  507.                     If PromptMatches("GoUnavailableHMI1") Then Comms.Send Chr$(3)+"T\r"
  508.                     If PromptMatches("GoUnavailableHMI2") Then Comms.Send "GO TOP\r"
  509.                 End If
  510.                 WaitFor "\n!"
  511.             End If
  512.             LogResult "GoForum:"+forum+":Failed - unavailable."
  513.             Exit Function
  514.         End If
  515.         If PromptMatches("GoUnknown") Or PromptMatches("GoEmpty") Then
  516.             LastFailure = forum
  517.             SetHighMessage = False
  518.             GoTop
  519.             LogResult "GoForum:"+forum+":Failed - unknown."
  520.             Exit Function
  521.         End If
  522.  
  523.         ' It all worked
  524.         WhereAmI = forum
  525.     End If
  526.  
  527.     LastFailure = ""
  528.     GoForum = True
  529.     Exit Function
  530.  
  531. GoForum_error:
  532.     On Error Goto 0
  533.     LogResult "GoForum:"+forum+":Failed error: "+Error$+" ("+LTrim(Str$(Err))+")"
  534.     Trackers.delete
  535.     SetupStandardTrackers
  536. End Function
  537.  
  538.