home *** CD-ROM | disk | FTP | other *** search
/ .net 1999 December / netCD65.iso / pc / Software / VirtualA / 16bit / vaper16.exe / %MYDIR% / BASIC.EBS < prev    next >
Encoding:
Text File  |  1999-10-06  |  31.8 KB  |  1,185 lines

  1. 'T:BASIC.EBS for CompuServe
  2. ' VA 4.01 release
  3.  
  4. Global Const IM_DELETE    = 2048
  5.  
  6. Declare Function UniqueFileName$
  7. Declare Function QueueFile(service As String, sfilename As String, queueflags As Long) As Boolean
  8. Declare Sub ReportSuccess(id As String)
  9. Declare Function StartCapture(pseudo As String)
  10. Declare Function NoSpaces(s As String) As String
  11. Declare Function GoForum(ByVal forum As String) As Boolean
  12. Declare Sub ResetForum
  13. Declare Sub UsenetOptions(id As String, realname As String, organisation As String, limit As String)
  14. Declare Function ParseString(args As String, delim As String) As String
  15. Declare Function ForumName(forum As String) As String
  16. Declare Function ToSpaces(s As String) As String
  17. Declare Function GetNumMessages() As Integer
  18. Declare Sub SetNumMessages(num As Integer)
  19. Declare Sub TimedWaitForPrompt(prefix As String, timeout As Integer)
  20. Declare Function FileUrl(fn As String) As String
  21.  
  22. Public MailName As String      'My name for mail purposes
  23. Public DownloadDir As String    'where downloads go
  24.  
  25. Dim numpages As Integer  ' Number of pages recieved used by CapturePages()
  26. Dim pseudo As String     ' "conf/topic from" used by CapturePages()
  27. Dim cleanup As Boolean     ' Workaround bug in CIS Euro What's New
  28. Dim search As String     ' Used for search (dictionary etc) scripts
  29. Dim HasFailed As Boolean ' A failure has been detected (eg No records found)
  30. Dim Submenu As Boolean     ' Send a '2\r' at the next prompt
  31. Dim SetPagedOutputToNO As Boolean
  32. Dim SetEditorToNO As Boolean
  33.  
  34. 'T:SetFailed (subroutine) (CompuServe)
  35. Sub SetFailed(t As Tracker)
  36.     HasFailed = True
  37.     t.reset
  38. End Sub
  39.  
  40. 'T:PageSplitter (subroutine) (CompuServe)
  41. ' Split message stream up
  42. Sub PageSplitter(t As Tracker)
  43.     ' End of previous message
  44.     CaptureRewind Len(t.match)
  45.     CaptureText Basic.Eoln$+"!end"
  46.  
  47.     ' Start of next message
  48.     CaptureText Basic.Eoln$+"!start "+pseudo+Basic.Eoln$
  49.  
  50.     ' Tell user we've got another message
  51.     numpages = numpages + 1
  52.     Terminal.CaptureStatus numpages
  53.     t.reset
  54. End Sub
  55.  
  56. 'T:SendSearch (subroutine) (CompuServe)
  57. ' Sends the 'search' string and then just sends a '\r' next time.
  58. Sub SendSearch(t As Tracker)
  59.     If search="" Then
  60.         CaptureRewind Len(t.match)
  61.         CaptureText Basic.Eoln$+"!end"+Basic.Eoln$
  62.         If HasFailed Then
  63.             Capture CAPTURE_OFF
  64.         End If
  65.     End If
  66.     t.reset
  67.     Comms.Send search+"\r"
  68.     search = ""
  69. End Sub
  70.  
  71. 'T:Rewind (subroutine) (CompuServe)
  72. ' Removes the match from the capture file
  73. Sub Rewind(t As Tracker)
  74.     CaptureRewind Len(t.match)
  75.     t.reset
  76. End Sub
  77.  
  78. 'T:SetSubmenu (subroutine) (CompuServe)
  79. ' Sets flag to choose item 2 at the next menu prompt.
  80. Sub SetSubmenu(t As Tracker)
  81.     t.reset
  82.     Submenu = True
  83. End Sub
  84.  
  85. Function ContainsWildCard(pattern As String) As Boolean
  86.     ContainsWildCard = False
  87.     If instr(pattern, "*") Then ContainsWildCard = True
  88.     If instr(pattern, "?") Then ContainsWildCard = True
  89.     If instr(pattern, "[") Then ContainsWildCard = True
  90. End Function
  91.  
  92. 'T:CapturePages (subroutine) (CompuServe)
  93. ' Generic routine for getting 'all' news articles
  94. Sub CapturePages(id As String, forum As String, menuid As String, _
  95.     ppseudo As String, endofmsg As String, pcleanup As Boolean, _
  96.     prompt As String, psearch As String, notfound As String, _
  97.     morestr As String, doall As Boolean)
  98.  
  99.     Dim tSearch As Tracker, tStart As Tracker, tRewind As Tracker
  100.     Dim tNotFound As Tracker, tSubmenu As Tracker, tEnd1 As Tracker
  101.     Dim tEnd2 As Tracker, tEnd3 As Tracker, filename As String
  102.  
  103.     ' Go to main page
  104.     If Not GoForum(forum) Then
  105.         LogResult "Failed trying to GO "+forum
  106.         Exit Sub
  107.     End If
  108.  
  109.     ' Store in a global
  110.     pseudo = ppseudo
  111.     cleanup = pcleanup
  112.     search = psearch
  113.     HasFailed = False
  114.     Submenu = False
  115.  
  116.     ' Setup tracker for answering the search request
  117.     If prompt<>"" Then
  118.         Set tSearch = CreateTracker("SearchPrompt", prompt, "SendSearch", False, ContainsWildCard(prompt))
  119.     End If
  120.     If notfound<>"" Then
  121.         Set tNotFound = CreateTracker("NotFound", notfound, "SetFailed", False, ContainsWildCard(notfound))
  122.     End If
  123.  
  124.     ' Start capturing
  125.     numpages = 0
  126.     filename = UniqueFilename$()
  127.     Capture CAPTURE_ON, filename
  128.     Set tStart = CreateTracker("MessageStart", endofmsg, "PageSplitter", True, ContainsWildCard(endofmsg))
  129.     Set tRewind = CreateTracker("Rewind", "\nChoice*is not available for download", "Rewind", False, True)
  130.     If morestr<>"" Then
  131.         Set tSubmenu = CreateTracker("Submenu", morestr, "SetSubmenu", False, ContainsWildCard(morestr))
  132.     End If
  133.     Set tEnd1 = CreateTracker("PromptLastEnd1", "\nNo next page. Key M for menu or T for top!", "", False, True)
  134.     Set tEnd2 = CreateTracker("PromptLastEnd2", "\nMenu Choices currently invalid. Enter M for Menu.!", "", False, True)
  135.     Set tEnd3 = CreateTracker("PromptLastPrompt", "\n!", "", False, True)
  136.  
  137.     ' Go to submenu item if there is one
  138.     If menuid<>"" Then
  139.         Comms.Send menuid+"\r"
  140.         WaitForPrompt "Prompt"
  141.         CaptureRewind 1
  142.     End If
  143.  
  144.     ' Go to submenu item if there is one
  145.     If Submenu Then
  146.         numpages = 0
  147.         Comms.Send "2\r"
  148.         WaitFor "2"
  149.         CaptureRewind 1
  150.         WaitForPrompt "Prompt"
  151.         CaptureRewind 1
  152.     End If
  153.  
  154.     ' Get all messages
  155.     If HasFailed Then
  156.         Comms.Send "\r"
  157.         WaitForPrompt "Prompt"
  158.     Else
  159.         If numpages<>1 Or doall Then
  160.             numpages = 0
  161.             Terminal.CaptureStatus CAPTURE_ON
  162.             Terminal.Enabled = False
  163.             Comms.Send "all\r"
  164.             WaitFor "all"
  165.             CaptureRewind 3
  166.             WaitForPrompt "PromptLast"
  167.  
  168.             If PromptMatches("PromptLastEnd1") Then CaptureRewind 42
  169.             If PromptMatches("PromptLastEnd2") Then CaptureRewind 50
  170.             If PromptMatches("PromptLastPage") Then CaptureRewind 10
  171.             If PromptMatches("PromptLastPrompt") Then CaptureRewind 1
  172.             Terminal.CaptureStatus CAPTURE_OFF
  173.         End If
  174.     End If
  175.     CaptureText Basic.Eoln$+"!end"+Basic.Eoln$
  176.  
  177.     ' Clean up
  178.     tStart.delete
  179.     tRewind.delete
  180.     tEnd1.delete
  181.     tEnd2.delete
  182.     tEnd3.delete
  183.     If prompt<>"" Then tSearch.delete
  184.     If notfound<>"" Then tNotFound.delete
  185.     If morestr<>"" Then tSubmenu.delete
  186.     Capture CAPTURE_OFF
  187.     If cleanup Then
  188.         Comms.Send "m\rgo top\r"
  189.         WaitForPrompt "Prompt"
  190.         On Error Goto Timeout_Error
  191.         TimedWaitForPrompt "Prompt", 1 ' catch an extra prompt if there is one
  192. Timeout_Error:
  193.         On Error Goto 0
  194.     End If
  195.     If prompt<>"" Then
  196.         GoTop
  197.     Else
  198.         ResetForum
  199.     End If
  200.     Terminal.Enabled = True
  201.     ' Add to import queue
  202.     If QueueFile(Session.Service, filename, IM_DELETE) Then
  203.         ReportSuccess id & " : Information from " & forum & " collected "
  204.     End If
  205. End Sub
  206.  
  207. 'T:WhatsNew (subroutine) (CompuServe) (CompuServe)
  208. Sub WhatsNew(id As String)
  209.     CapturePages id, "cis:new", "", "Whats_New/World_News CompuServe", _
  210.         "\nWhat's New*(FREE)*\r", True, "", "", "", "", True
  211.     SetLastUpdated "Whats New in the World"
  212. End Sub
  213.  
  214. 'T:EuropeWhatsNew (subroutine) (CompuServe)
  215. Sub EuropeWhatsNew(id As String)
  216.     ' Still here in case people have it scheduled
  217.     UKWhatsNew id
  218.     GermanWhatsNew id
  219.     FrenchWhatsNew id
  220.     DutchWhatsNew id
  221. End Sub
  222.  
  223. 'T:UKWhatsNew (subroutine) (CompuServe)
  224. Sub UKWhatsNew(id As String)
  225.     CapturePages id, "cis:uknew", "", "Whats_New/United_Kingdom_News CompuServe", _
  226.         "\nWhat's New*(FREE)*\r", True, "", "", "", "", True
  227.     SetLastUpdated "United Kingdom Whats New"
  228. End Sub
  229.  
  230. 'T:GermanWhatsNew (subroutine) (CompuServe)
  231. Sub GermanWhatsNew(id As String)
  232.     CapturePages id, "cis:gernew", "", "Whats_New/German_News CompuServe", _
  233.         "\nCOMPUSERVE AKTUELL(FREE)*\r", True, "", "", "", "", True
  234.     SetLastUpdated "German Whats New"
  235. End Sub
  236.  
  237. 'T:FrenchWhatsNew (subroutine) (CompuServe)
  238. Sub FrenchWhatsNew(id As String)
  239.     CapturePages id, "cis:frenew", "", "Whats_New/French_News CompuServe", _
  240.         "\nA la une (FREE)*\r", True, "", "", "", "", True
  241.     SetLastUpdated "French Whats New"
  242. End Sub
  243.  
  244. 'T:PacificWhatsNew (subroutine) (CompuServe)
  245. Sub PacificWhatsNew(id As String)
  246.     CapturePages id, "cis:cpnew", "", "Whats_New/Pacific_News CompuServe", _
  247.         "\nWhat's New*(FREE)*\r", True, "", "", "", "", True
  248.     SetLastUpdated "Central Pacific Whats New"
  249. End Sub
  250.  
  251. 'T:DutchWhatsNew (subroutine) (CompuServe)
  252. Sub DutchWhatsNew(id As String)
  253.     CapturePages id, "cis:nlnew", "", "Whats_New/Dutch_News CompuServe", _
  254.         "\n*(FREE)\r", True, "", "", "", "", True
  255.     SetLastUpdated "Dutch Whats New"
  256. End Sub
  257.  
  258. 'T:WhichWhatsNew (Subroutine) (CompuServe)
  259. Sub WhichWhatsNew(id as String, WhatsNewType as String)
  260.     Select Case WhatsNewType
  261.     Case "Whats New in the World"
  262.         WhatsNew id
  263.     Case "United Kingdom Whats New"
  264.         UKWhatsNew id
  265.     Case "German Whats New"
  266.         GermanWhatsNew id
  267.     Case "French Whats New"
  268.         FrenchWhatsNew id
  269.     Case "Central Pacific Whats New"
  270.         PacificWhatsNew id
  271.     Case "Dutch Whats New"
  272.         DutchWhatsNew id
  273.     Case "All Whats New"
  274.         WhatsNew id
  275.         UKWhatsNew id
  276.         GermanWhatsNew id
  277.         FrenchWhatsNew id
  278.         PacificWhatsNew id
  279.         DutchWhatsNew id
  280.     Case Else
  281.         LogResult "Unknown Whats New: " + WhatsNewType
  282.     End Select
  283. End Sub
  284.  
  285. 'T:Eberts (subroutine) (CompuServe)
  286. Sub Eberts(id As String)
  287.     CapturePages id, "cis:ebert", "1", "Ebert/Recent_Reviews Roger_Ebert", _
  288.         "\nMovies/Roger Ebert\r", False, "", "", "", "", True
  289. End Sub
  290.  
  291. 'T:Groliers (subroutine) (CompuServe)
  292. Sub Groliers(id As String, txt As String)
  293.     CapturePages id, "cis:aae", "1", "Encyclopedia/Groliers "+NoSpaces(txt), _
  294.         "\nGrolier's", False, "\nSearch term: ", txt, _
  295.         "\nNo listings were found", "\nArticles selected:*that begin", True
  296. End Sub
  297.  
  298. 'T:Hutchinson (subroutine) (CompuServe)
  299. Sub Hutchinson(id As String, txt As String)
  300.     Dim t As Tracker
  301.  
  302.     ' Install handler for images
  303.     Set t = CreateTracker("StartDownload", "\nEnter ""DOWN"" to download!", "SendCR")
  304.  
  305.     CapturePages id, "cis:hutchinson", "1", _
  306.         "Encyclopedia/Hutchinsons "+NoSpaces(txt), "\nHutchinson", _
  307.         False, "\nEnter*Search Term: ", txt, "\nNo records found", _
  308.         "\nArticles Found:*that begin", True
  309.  
  310.     t.delete
  311. End Sub
  312.  
  313. 'T:Dictionary (subroutine) (CompuServe)
  314. Sub Dictionary(id As String, txt As String)
  315.     CapturePages id, "cis:dictionary", "3", _
  316.         "Dictionary/Words "+NoSpaces(txt), "\nCompuServe", _
  317.         False, "\nSearch term: ", txt, "\nNo listings were found", _
  318.         "\nDefinitions found:*that begin", False
  319. End Sub
  320.  
  321. 'T:Drugs (subroutine) (CompuServe)
  322. Sub Drugs(id As String, txt As String)
  323.     CapturePages id, "cis:drugs", "6", _
  324.         "Drugs/Reference "+NoSpaces(txt), "\nDrug Reference", _
  325.         False, "\nSearch term (or /HELP): ", txt, "\nNo listings were found", _
  326.         "\nDrug names found:*that begin", True
  327. End Sub
  328.  
  329. 'T:Lexikon (subroutine) (CompuServe)
  330. Sub Lexikon(id As String, txt As String)
  331.     CapturePages id, "cis:beplexikon", "4", _
  332.         "Bertelsmann/Lexikon "+NoSpaces(txt), _
  333.         "\nBertelsmann Lexikon*BRT-*\r", False, "\nSuchbegriff: ", _
  334.         txt, "\nKein Eintrag gefunden", "\nEs wurden*Artikel gefunden, die mit", False
  335. End Sub
  336.  
  337. 'T:SendB (subroutine) (global)
  338. 'Sends a "b" to the service
  339. Sub SendB(t As Tracker)
  340.     Comms.Send "b\r"
  341.     t.reset
  342. End Sub
  343.  
  344. 'T:MSL (subroutine) (CompuServe)
  345. Sub MSL(id As String, remote As String, filename As String)
  346.     Dim t As Tracker, tProt As Tracker
  347.  
  348.     If Not GoForum("cis:msl") Then
  349.         LogResult "Unable to enter MS Library."
  350.         Exit Sub
  351.     End If
  352.  
  353.     Set t = CreateTracker("PromptNoRecords", "no records found")
  354.     Comms.Send "2\r"
  355.     WaitForPrompt "Prompt"
  356.     Comms.Send "4\r"
  357.     WaitFor "ame:"
  358.     Comms.Send remote+"\r"
  359.     WaitForPrompt "Prompt"
  360.     t.delete
  361.  
  362.     ' Any matches?
  363.     If PromptMatches("PromptNoRecords") Then
  364.         LogResult "No matches for ["+remote+"] from MSL."
  365.         WaitForPrompt "Prompt"
  366.         GoTop
  367.         ReportSuccess id & " : No matches for " & remote & " found in MSL "
  368.         Exit Sub
  369.     End If
  370.  
  371.     ' Go and download it
  372.     Comms.Send "5\r"
  373.     Set t = CreateTracker("PromptDownload", "download!")
  374.     WaitForPrompt "Prompt"
  375.     t.delete
  376.  
  377.     ' Only download if there is exactly one match
  378.     If PromptMatches("PromptDownload") Then
  379.         Set tProt = CreateTracker("SendProtocol", "Y) :", "SendB", False, False)
  380.         Comms.Send "down\r"
  381.         WaitFor "computer :"
  382.         Comms.SendLiteral DownloadDir+filename
  383.         Comms.Send "\r"
  384.         WaitForPrompt "Prompt"
  385.     Else
  386.         LogResult "Error while trying to download "+remote+" from MSL."
  387.     End If
  388.  
  389.     ' Clean up
  390.     GoTop
  391.     ReportSuccess id & " : " & FileUrl(DownloadDir+filename) & " downloaded from MSL "
  392. End Sub
  393.  
  394. 'T:MSKB (subroutine) (CompuServe)
  395. Sub MSKB(id As String, keywords As String)
  396.     Dim tEnd1 As Tracker, tEnd2 As Tracker, tStart As Tracker
  397.     Dim tNotFound As Tracker
  398.     Dim filename As String, tmp As String
  399.  
  400.     ' Go to main page
  401.     If Not GoForum("cis:mskb") Then
  402.         LogResult "Failed trying to GO MSKB"
  403.         Exit Sub
  404.     End If
  405.  
  406.     If UCase$(Mid(keywords,1,1))="Q" Or IsNumeric(keywords) Then
  407.         ' Old style MSKB
  408.         Comms.Send "6\r"
  409.         WaitFor ":"
  410.         Comms.Send keywords+"\r"
  411.  
  412.         Set tEnd1 = CreateTracker("PromptEnd1", "\nLast page. Enter ""DOWN"" to download!")
  413.         Set tEnd2 = CreateTracker("PromptEnd2", "\nPress <CR> for more, or ""DOWN"" to download!")
  414.         filename = UniqueFilename$()
  415.         WaitFor keywords
  416.         Capture CAPTURE_ON, filename
  417.         CaptureText "!start Mskb/Download Microsoft "+Basic.Eoln$+keywords+Basic.Eoln$
  418.         WaitForPrompt "Prompt"
  419.  
  420.         ' Clear up
  421.         If PromptMatches("PromptEnd2") Then
  422.             CaptureRewind 43
  423.         Else
  424.             CaptureRewind 36
  425.         End If
  426.         CaptureText Basic.Eoln$+"!end"+Basic.Eoln$
  427.         Capture CAPTURE_OFF
  428.         tEnd1.delete
  429.         tEnd2.delete
  430.         GoTop
  431.  
  432.         ' Add to import queue
  433.         If QueueFile(Session.Service, filename, IM_DELETE) Then
  434.             ReportSuccess id & " : Document : " & keywords & " collected from MSKB "
  435.         End If
  436.     Else
  437.         HasFailed = False
  438.         pseudo = "Mskb/Download Microsoft"
  439.  
  440.         Comms.Send "4\r"
  441.         WaitForPrompt "Prompt"
  442.  
  443.         Set tNotFound = CreateTracker("NotFound", "no documents found that match", "SetFailed")
  444.  
  445.         If Mid$(keywords, 1, 1)="!" Then
  446.             Comms.Send "6\r"
  447.             tmp = Mid$(keywords, 2)
  448.         Else
  449.             Comms.Send "7\r"
  450.             tmp = keywords
  451.         End If
  452.         WaitFor "1:"
  453.         Comms.Send ParseString(tmp, " ")+"\r"
  454.  
  455.         WaitFor "2:"
  456.         If tmp<>"" Then
  457.             Comms.Send ParseString(tmp, " ")+"\r"
  458.  
  459.             WaitFor "3:"
  460.             Comms.Send ParseString(tmp, " ")+"\r"
  461.         Else
  462.             Comms.Send "\r"
  463.         End If
  464.  
  465.         WaitForPrompt "PromptMain"
  466.         tNotFound.delete
  467.  
  468.         ' Has it failed ?
  469.         If HasFailed Then
  470.             Comms.Send "\r"
  471.             WaitForPrompt "PromptMain"
  472.             ResetForum
  473.  
  474.             ' Report an error
  475.             ReportSuccess id & " : MSKB search : no matches."
  476.             Exit Sub
  477.         End If
  478.  
  479.         ' Start capturing
  480.         Comms.Send "8\r"
  481.         WaitFor "8\r"
  482.         Terminal.Enabled = False
  483.         numpages = 0
  484.         filename = UniqueFilename$()
  485.         Capture CAPTURE_ON, filename
  486.         Set tStart = CreateTracker("MessageStart", "\nKnowledge Base", "PageSplitter")
  487.         Set tEnd1  = CreateTracker("PromptEnd1", "\nLast page. Enter ""DOWN"" to download!")
  488.         Set tEnd2  = CreateTracker("PromptEnd2", "\nPress <CR> for more, or ""DOWN"" to download!")
  489.  
  490.         WaitForPrompt "Prompt"
  491.         If PromptMatches("PromptMain") Then
  492.             Comms.Send "all\r"
  493.             WaitForPrompt "Prompt"
  494.         End If
  495.  
  496.         ' The End
  497.         If PromptMatches("PromptEnd2") Then
  498.             CaptureRewind 43
  499.         Else
  500.             CaptureRewind 36
  501.         End If
  502.         CaptureText Basic.Eoln$+"!end"+Basic.Eoln$
  503.         Terminal.CaptureStatus CAPTURE_OFF
  504.         Capture CAPTURE_OFF
  505.  
  506.         ' Clean up
  507.         tStart.delete
  508.         tEnd1.delete
  509.         tEnd2.delete
  510.         Comms.Send "\r"
  511.         WaitForPrompt "Prompt"
  512.         ResetForum
  513.         Terminal.Enabled = True
  514.  
  515.         ' Add to import queue
  516.         If QueueFile(Session.Service, filename, IM_DELETE) Then
  517.             ReportSuccess id & " : Information from Mskb collected"
  518.         End If
  519.     End If
  520. End Sub
  521.  
  522. 'T:CountSelection(t As Tracker)
  523. Sub CountSelection(t As Tracker)
  524.     Dim s As String
  525.     Dim i As Integer
  526.  
  527.     If HasFailed=False Then
  528.         s = ""
  529.         For i = 1 To Len(t.match)
  530.             If IsNumeric(Mid(t.match, i, 1)) Then
  531.                 s = Mid(t.match, i)
  532.                 Exit For
  533.             End If
  534.         Next
  535.         If InStr(s, " ")>0 Then
  536.             s = Mid(s, 1, InStr(s, " ")-1)
  537.             If Len(s) >= 5 Then
  538.                 numpages = 32760
  539.             Else
  540.                 numpages = Val(s)
  541.             End If
  542.         End If
  543.     End If
  544.     t.reset
  545. End Sub
  546.  
  547. 'T:FileFinder (subroutine) (CompuServe)
  548. Sub FileFinder(id As String, goWord As String, keywords As String, ftype As String, _
  549.     fext As String, filename As String, limit As String, getdetail As String)
  550.     Dim tmp As String, fname As String, finder As String
  551.     Dim i As Integer
  552.     Dim t1 As Tracker, t2 As Tracker, t3 As Tracker, t4 As Tracker
  553.     Dim t5 As Tracker, t6 As Tracker, t7 As Tracker, t8 As Tracker
  554.  
  555.     ' Extract the GO word
  556.     finder = Mid$(goWord, InStr(goWord, "(")+1)
  557.     finder = Mid$(finder, 1, Len(finder)-1)
  558.     goWord = ParseString(goWord, " ")
  559.  
  560.     ' default to 100 limit
  561.     If limit="" Then limit="100"
  562.     If goWord="GAMEFF" Then goWord = "GMF-10"
  563.  
  564.     If Not GoForum(goWord) Then
  565.         LogResult finder+" unavailable."
  566.         Exit Sub
  567.     End If
  568.  
  569.     If goWord="GMF-10" Then
  570.         Comms.Send "9\r"
  571.     Else
  572.         Comms.Send "1\r"
  573.     End If
  574.     WaitForPrompt "PromptMain"
  575.  
  576.     ' Install error handler
  577.     HasFailed = False
  578.     numpages = 0
  579.     Set t1 = CreateTracker("Failed", "\nThere were no articles located that match your search criteria.", "SetFailed")
  580.     Set t2 = CreateTracker("Selection", "\nCurrent selection*file", "CountSelection", False, True)
  581.  
  582.     ' (1) Request keyword search.
  583.     If keywords<>"" Then
  584.         tmp = keywords
  585.         Comms.Send "1\r"
  586.  
  587.         WaitFor "1:"
  588.         Comms.Send ParseString(tmp, " ")+"\r"
  589.  
  590.         WaitFor "2:"
  591.         If tmp<>"" Then
  592.             Comms.Send ParseString(tmp, " ")+"\r"
  593.  
  594.             WaitFor "3:"
  595.             Comms.Send ParseString(tmp, " ")+"\r"
  596.         Else
  597.             Comms.Send "\r"
  598.         End If
  599.  
  600.         WaitForPrompt "PromptMain"
  601.     End If
  602.  
  603.     ' (2) We don't do date since it seems to hang CIS rather a lot.
  604.  
  605.     ' (3) We don't do forum search since we'd have to pick from a list
  606.     ' which is slow and a pain.
  607.  
  608.     ' (4) File type - accepts number or text
  609.     If HasFailed=False And ftype<>"" And UCase(Mid(ftype, 1, 2))<>"AN" Then
  610.         ' Validate the type
  611.         tmp = UCase(Mid(ftype, 1, 1))
  612.         i = InStr("ABIRNGJ", tmp)
  613.         If i<>0 Then tmp = Str$(i+1)
  614.         If InStr("12345678", tmp) Then
  615.             Comms.Send "4\r"
  616.             WaitForPrompt "PromptMain"
  617.             Comms.Send tmp+"\r"
  618.             WaitForPrompt "PromptMain"
  619.         End If
  620.     End If
  621.  
  622.     ' (5) File Extension
  623.     If HasFailed=False And fext<>"" Then
  624.         Comms.Send "5\r"
  625.         WaitFor "):"
  626.         Comms.Send fext+"\r"
  627.         WaitForPrompt "PromptMain"
  628.     End If
  629.  
  630.     ' (6) File Name
  631.     If HasFailed=False And filename<>"" Then
  632.         Comms.Send "6\r"
  633.         WaitFor "):"
  634.         Comms.Send filename+"\r"
  635.         WaitForPrompt "PromptMain"
  636.     End If
  637.  
  638.     ' (7) Submitter isn't handled because it causes loads of problems
  639.     ' Submitter ID:
  640.  
  641.     ' If too many matches then don't bother
  642.     If limit<>"" And numpages > Val(limit) Then
  643.         HasFailed = True
  644.     End If
  645.  
  646.     ' Display it
  647.     t1.delete
  648.     t2.delete
  649.     tmp = finder
  650.     pseudo = "File_Finder/"+ParseString(tmp, " ")+" CompuServe"
  651.     If HasFailed Then
  652.         fname = StartCapture(pseudo)
  653.         CaptureText keywords+", "+ftype+", "+fext+", "+filename+", " _
  654.             +limit+", "+getdetail+Basic.Eoln$
  655.         If limit<>"" And numpages > Val(limit) Then
  656.             CaptureText "There were too many articles located that match your search criteria."
  657.         Else
  658.             CaptureText "There were no articles located that match your search criteria."
  659.         End If
  660.         CaptureText Basic.Eoln$+"!end"+Basic.Eoln$
  661.     Else
  662.         Comms.Send "8\r"
  663.         WaitFor "8\r"
  664.  
  665.         ' Start capturing
  666.         fname = StartCapture(pseudo)
  667.         CaptureText keywords+", "+ftype+", "+fext+", "+filename+", " _
  668.             +limit+", "+getdetail+Basic.Eoln$
  669.  
  670.         WaitForPrompt "Prompt"
  671.         CaptureRewind 1
  672.         CaptureText Basic.Eoln$+"!end"+Basic.Eoln$
  673.  
  674.         If UCase(Mid(getdetail,1,1))="Y" And numpages>1 Then
  675.             numpages = 0
  676.             Set t1 = CreateTracker("MessageStart1", "\nPC File Finder", "PageSplitter")
  677.             Set t2 = CreateTracker("MessageStart2", "\nGraphics File Finder", "PageSplitter")
  678.             Set t3 = CreateTracker("MessageStart3", "\nGames File Finder", "PageSplitter")
  679.             Set t4 = CreateTracker("MessageStart4", "\nMS File Finder", "PageSplitter")
  680.             Set t5 = CreateTracker("MessageStart5", "\nAmiga File Finder", "PageSplitter")
  681.             Set t6 = CreateTracker("MessageStart6", "\nAtari File Finder", "PageSplitter")
  682.             Set t7 = CreateTracker("MessageStart7", "\nMAC File Finder", "PageSplitter")
  683.             Set t8 = CreateTracker("MessageStart8", "\nWindows File Finder", "PageSplitter")
  684.             Terminal.CaptureStatus CAPTURE_ON
  685.             Terminal.Enabled = False
  686.  
  687.             ' Get all messages
  688.             Comms.Send "all\r"
  689.             WaitForPrompt "PromptLastPage"
  690.             CaptureRewind 10
  691.             CaptureText Basic.Eoln$+"!end"+Basic.Eoln$
  692.             Terminal.CaptureStatus CAPTURE_OFF
  693.             Terminal.Enabled = True
  694.             If NoSpaces(finder)="WINFF" Then
  695.                 Comms.Send "go top\r"
  696.             Else
  697.                 Comms.Send "\r"
  698.             End If
  699.             WaitForPrompt "PromptMain"
  700.             t1.delete
  701.             t2.delete
  702.             t3.delete
  703.             t4.delete
  704.             t5.delete
  705.             t6.delete
  706.             t7.delete
  707.             t8.delete
  708.         Else
  709.             CaptureRewind 1
  710.             CaptureText Basic.Eoln$+"!end"+Basic.Eoln$
  711.         End If
  712.     End If
  713.  
  714.     ' Clean up
  715.     Capture CAPTURE_OFF
  716.     GoTop
  717.  
  718.     ' Add to import queue
  719.     If QueueFile(Session.Service, fname, IM_DELETE) Then
  720.         ReportSuccess id & " : Search for " & keywords & ";" & ftype  & ";" & fext    & ";" &  filename & " "
  721.     End If
  722. End Sub
  723.  
  724. 'T:SetupOptions (subroutine) (CompuServe)
  725. Sub SetupOptions(id As String)
  726.     Dim tYN As Tracker, tNew As Tracker
  727.     Dim HitCR As Tracker, tName As Tracker
  728.     Dim t1 as tracker, t2 as tracker
  729.     Dim tInvalid as tracker
  730.  
  731.     ' Handle the odd CIS query automatically
  732.     Set tYN = CreateTracker("IsYN", "(Y or N) !")
  733.     Set tNew = CreateTracker("IsNew", "New:")
  734.     Set HitCR = CreateTracker("PromptMore", "<CR> for more !", "SendCR")
  735.     Set tName = CreateTracker("IsName", "name:")
  736.  
  737.     Comms.Bitmask = True
  738.     ' Set mail name
  739.     Comms.Send "go home:mail\r"
  740.     WaitForPrompt "Prompt"
  741.     Comms.Send "go home:mail\r"
  742.     WaitForPrompt "Prompt"
  743.     Comms.Send "address name\r"
  744.     WaitForPrompt "Is"
  745.     If PromptMatches("IsYN") Then
  746.         Comms.Send "y\r"
  747.         WaitForPrompt "Prompt"
  748.     Else
  749.         Comms.SendLiteral MailName
  750.         Comms.Send "\r"
  751.         Set tNew = CreateTracker("IsNew", "New:", "SendCR")
  752.         WaitFor "N) !"
  753.         Comms.Send "n\r"
  754.         WaitForPrompt "Prompt"
  755.         tNew.delete
  756.     End If
  757.     tYN.delete
  758.     tName.delete
  759.     Comms.Send "set retain yes\r"
  760.     WaitForPrompt "Prompt"
  761.     SetEditorToNO = False
  762.     SetPagedOutputToNO = False
  763.     Set t1 = CreateTracker("EdLineNum", "EDITOR uses line numbers [YES]", "EditorLineNum")
  764.     Set t2 = CreateTracker("PgOutput", "Output is PAGED [YES]", "PagedOutput")
  765.     Comms.Send "set\r"
  766.     WaitForPrompt "Prompt"
  767.     t1.Delete
  768.     t2.Delete
  769.     If SetEditorToNO = True then
  770.         Comms.Send "1\r"
  771.         WaitForPrompt "Prompt"
  772.     End If
  773.     If SetPagedOutputToNO = True then
  774.         Comms.Send "3\r"
  775.         WaitForPrompt "Prompt"
  776.     End If
  777.     Comms.Send "mode\r"
  778.     WaitForPrompt "Prompt"
  779.     Comms.Send "3\r"
  780.     WaitForPrompt "Prompt"
  781.     Comms.Send "\r"
  782.     WaitFor "!"
  783.     Comms.Send "y\r"
  784.     WaitForPrompt "Prompt"
  785.     tName.Delete
  786.  
  787.     Comms.Send "go default\r"
  788.  
  789.     ' Set options
  790.     WaitFor "!"
  791.     Comms.Send "2\r"
  792.     WaitFor "Enter"
  793.     WaitFor "!"
  794.     Comms.Send "2\r"
  795.     WaitFor "Enter"
  796.     WaitFor "!"
  797.     Comms.Send "1\r"
  798.     WaitFor "Enter"
  799.     WaitFor "!"
  800.     Comms.Send "1\r"
  801.     WaitFor "Enter"
  802.     WaitFor "!"
  803.     Comms.Send "2\r"
  804.     WaitFor "Enter"
  805.     WaitFor "!"
  806.     Comms.Send "2\r"
  807.     WaitFor "Enter"
  808.     WaitFor "!"
  809.     Comms.Send "4\r"
  810.     WaitFor "Enter"
  811.     WaitFor "!"
  812.     Comms.Send "4\r"
  813.     WaitFor "Enter"
  814.     WaitFor "!"
  815.     Comms.Send "5\r"
  816.     WaitFor "Enter"
  817.     WaitFor "!"
  818.     Comms.Send "1\r"
  819.     WaitFor "Enter"
  820.     WaitFor "!"
  821.     Comms.Send "6\r"
  822.     WaitFor "Enter"
  823.     WaitFor "!"
  824.     Comms.Send "2\r"
  825.     WaitFor "Enter"
  826.     WaitFor "!"
  827.     Comms.Send "\r"
  828.     WaitFor "Enter"
  829.     WaitFor "!"
  830.     Comms.Send "3\r"
  831.     WaitFor "Enter"
  832.     WaitFor "!"
  833.     Comms.Send "1\r"
  834.     WaitFor "Enter"
  835.     WaitFor "!"
  836.     Comms.Send "2\r"
  837.     WaitFor "Enter"
  838.     WaitFor "!"
  839.     Comms.Send "2\r"
  840.     WaitFor ".)"
  841.     WaitFor ".)"
  842.     WaitFor "Enter"
  843.     WaitFor "!"
  844.     Comms.Send "1\r"
  845.     WaitFor "!"
  846.     Comms.Send "\r"
  847.     WaitFor "Enter"
  848.     WaitFor "!"
  849.     Comms.Send "6\r" ' set english
  850.     WaitFor "Enter"
  851.     WaitFor "!"
  852.     Comms.Send "1\r"
  853.     WaitFor "Enter"
  854.     WaitFor "!"
  855.     Comms.Send "7\r"
  856.     WaitFor "Enter"
  857.     WaitFor "!"
  858.     Comms.Send "2\r"
  859.     WaitFor ":"
  860.     Comms.Send "\r"
  861.     WaitFor "Enter"
  862.     WaitFor "!"
  863.     Comms.Send "\r"
  864.     WaitFor "Enter"
  865.     WaitFor "!"
  866.     Comms.Send "4\r"
  867.     WaitFor "Enter"
  868.     WaitFor "!"
  869.     Comms.Send "1\r"
  870.     WaitFor "Enter"
  871.     WaitFor "!"
  872.  
  873.     'This handles the CIS Screw Up of making Term Type = 8 invalid
  874.     'even though it is on the menu!!!!!!!!!!! 
  875.     Set tInvalid=CreateTracker("CIS_Screw_Up", "\nEnter WIDTH \[10-255\] : ", "SendCR")
  876.  
  877.     Comms.Send "8\r"
  878.     WaitFor "!"
  879.  
  880.     Comms.Send "\r"
  881.  
  882.     tInvalid.Delete
  883.  
  884.     WaitFor "Enter"
  885.     WaitFor "!"
  886.     Comms.Send "2\r"
  887.     WaitFor ":"
  888.     Comms.Send "79\r"
  889.     WaitFor "Enter"
  890.     WaitFor "!"
  891.     Comms.Send "3\r"
  892.     WaitFor "page:"
  893.     Comms.Send "0\r"
  894.     WaitFor "Enter"
  895.     WaitFor "!"
  896.     Comms.Send "6\r"
  897.     WaitFor "Enter"
  898.     WaitFor "!"
  899.     Comms.Send "1\r"
  900.     WaitFor "Enter"
  901.     WaitFor "!"
  902.     Comms.Send "7\r"
  903.     WaitFor "Enter"
  904.     WaitFor "!"
  905.     Comms.Send "1\r"
  906.     WaitFor "Enter"
  907.     WaitFor "!"
  908.     Comms.Send "10\r"
  909.     WaitFor "Enter"
  910.     WaitFor "!"
  911.     Comms.Send "1\r"
  912.     WaitFor "Enter"
  913.     WaitFor "!"
  914.     Comms.Send "11\r"
  915.     WaitFor "Enter"
  916.     WaitFor "!"
  917.     Comms.Send "2\r"
  918.     WaitFor "Enter"
  919.     WaitFor "!"
  920.     Comms.Send "\r"
  921.     WaitFor "Enter"
  922.     WaitFor "!"
  923.     Comms.Send "5\r"
  924.     WaitFor "Enter"
  925.     WaitFor "!"
  926.     Comms.Send "1\r"
  927.     WaitFor "Enter"
  928.     WaitFor "!"
  929.     Comms.Send "2\r"
  930.     WaitFor "Enter"
  931.     WaitFor "!"
  932.     Comms.Send "\r"
  933.     WaitFor "Enter"
  934.     WaitFor "!"
  935.     Comms.Send "\r"
  936.     WaitFor "Enter"
  937.     WaitFor "!"
  938.     Comms.Send "\r"
  939.     WaitFor "Enter"
  940.     WaitFor "!"
  941.     Comms.Send "1\r"
  942.     WaitFor "!"
  943.     Comms.Send "\r"  ' Taz fix
  944.     HitCR.Delete
  945.  
  946.     WriteIni "Service "+Session.Service, "Set Options", "YES", Session.IniFilename
  947.     If id<>"" Then
  948.         ReportSuccess id & " : CompuServe has been successfully configured for use with Virtual Access"
  949.     Else
  950.         LogResult "CompuServe has been successfully configured for use with Virtual Access"
  951.     End If
  952. End Sub
  953.  
  954. 'T:Directory (subroutine) (CompuServe)
  955. Sub Directory(id As String, lastname As String, forename As String, city As String, country As String, state As String)
  956.     Dim fname As String
  957.     Dim t1 As Tracker, t2 As Tracker, t3 As Tracker
  958.  
  959.     If Not GoForum("cis:directory") Then
  960.         LogResult "Membership Directory Failed."
  961.         Exit Sub
  962.     End If
  963.  
  964.     Comms.Send "2\r"
  965.     WaitFor "help)"
  966.  
  967.     ' Lastname
  968.     WaitFor ":"
  969.     Comms.Send lastname+"\r"
  970.  
  971.     ' Forename
  972.     WaitFor ":"
  973.     Comms.Send forename+"\r"
  974.  
  975.     WaitFor ":"
  976.     If Len(city)>0 Then
  977.         Comms.Send city+"\r"
  978.     Else
  979.         Comms.Send "\r"
  980.         WaitFor ":"
  981.         Comms.Send country+"\r"
  982.  
  983.         If StrComp(country, "USA", 1)=0 Or StrComp(country, "US", 1)=0 Then
  984.             WaitFor ":"
  985.             Comms.Send state+"\r"
  986.         End If
  987.     End If
  988.  
  989.     WaitFor "\nSearching..."
  990.  
  991.     ' Install some error traps
  992.     Set t1 = CreateTracker("DirBadCity", "\nCity : ")
  993.     Set t2 = CreateTracker("DirBadCountry", "\nCountry \[*\] : ", "", False, True)
  994.     Set t3 = CreateTracker("DirOK", "\nEnter search crit")
  995.  
  996.     ' Start capturing
  997.     fname = StartCapture("Directory/Members CompuServe")
  998.     CaptureText lastname+", "+forename+", "+city+", "+country+", " _
  999.         +state+Basic.Eoln$+Basic.Eoln$
  1000.     CaptureText "Surname, Firstname                 Location, Country                    User Id"
  1001.     WaitForPrompt "Dir"
  1002.     If PromptMatches("DirOK") Then
  1003.         CaptureRewind 17
  1004.     End If
  1005.     CaptureText Basic.Eoln$+"!end"+Basic.Eoln$
  1006.     t1.delete
  1007.     t2.delete
  1008.     t3.delete
  1009.  
  1010.     ' Clean up
  1011.     Capture CAPTURE_OFF
  1012.     If PromptMatches("DirOK") Then
  1013.         WaitFor ") :"
  1014.     End If
  1015.     Comms.Send "/exit\r"
  1016.     WaitForPrompt "Prompt"
  1017.  
  1018.     ' Add to import queue
  1019.     If QueueFile(Session.Service, fname, IM_DELETE) Then
  1020.         ReportSuccess id & " : Search for " & lastname & ";" & forename & ";" & city & ";" & country & ";" & state & " " 
  1021.     End If
  1022. End Sub
  1023.  
  1024. 'T:SetSearch (subroutine) (CompuServe)
  1025. Sub SetSearch(menuid As String, prompt As String, txt As String)
  1026.     If HasFailed=False And txt<>"" And txt<>"0" And txt<>"1" Then
  1027.         Comms.Send menuid+"\r"
  1028.  
  1029.         WaitFor prompt
  1030.         Comms.Send txt+"\r"
  1031.  
  1032.         WaitForPrompt "PromptMain"
  1033.     End If
  1034. End Sub
  1035.  
  1036. 'T:SupportForum (subroutine) (CompuServe)
  1037. Sub SupportForum(id As String, searchtype As String, prodname As String)
  1038.     Dim fname As String
  1039.  
  1040.     ' Only search by one parameter
  1041.     If Mid$(searchtype, 1, 1)<>"1" And Mid$(searchtype, 1, 1)<>"2" Then
  1042.         LogResult "Support Forum Finder Failed due to invalid parameters."
  1043.         Exit Sub
  1044.     End If
  1045.  
  1046.     If Not GoForum("cis:support") Then
  1047.         LogResult "Support Forum Finder Failed."
  1048.         Exit Sub
  1049.     End If
  1050.  
  1051.     ' Tell CIS what to search for
  1052.     Comms.Send Mid$(searchtype, 1, 1)+"\r"
  1053.     WaitFor ":  :"
  1054.     Comms.SendLiteral prodname
  1055.     Comms.Send "\r"
  1056.     WaitFor "\r"
  1057.  
  1058.     ' Capture it
  1059.     fname = StartCapture("Support/Forums CompuServe")
  1060.     WaitForPrompt "PromptMain"
  1061.     CaptureRewind 1
  1062.     CaptureText Basic.Eoln$+"!end"+Basic.Eoln$
  1063.     Capture CAPTURE_OFF
  1064.     ResetForum
  1065.  
  1066.     ' Add to import queue
  1067.     If QueueFile(Session.Service, fname, IM_DELETE) Then
  1068.         ReportSuccess id & " : Search for " & prodname
  1069.     End If
  1070. End Sub
  1071.  
  1072. 'T:APOnline (subroutine) (CompuServe)
  1073. Sub APOnline(id As String, subj As String)
  1074.     Dim filename As String
  1075.     Dim i As Integer
  1076.     Dim section As String
  1077.     Dim t As Tracker, tErr As Tracker
  1078.  
  1079.     If Not GoForum("cis:apo-1") Then
  1080.         LogResult "Associated Press Online is not available; Please try later."
  1081.         Exit Sub
  1082.     End If
  1083.  
  1084.     filename = UniqueFilename$()
  1085.     Capture CAPTURE_ON, filename
  1086.     Terminal.CaptureStatus CAPTURE_ON
  1087.     Terminal.Enabled = False
  1088.     numpages = 0
  1089.     section = Mid(subj, InStr(subj, " ")+1)
  1090.     pseudo = "AP_Online/"+NoSpaces(section)+" Assoc_Press"
  1091.     If Mid(subj, 1, 2)="1 " Then
  1092.         Set t = CreateTracker("MessageStart", "\nAP Top News*E?T*\r", "PageSplitter", False, True)
  1093.     Else
  1094.         Set t = CreateTracker("MessageStart", "\nAP*E?T*\r", "PageSplitter", False, True)
  1095.     End If
  1096.     Set tErr = CreateTracker("PromptInvalid", "\n* is an invalid choice !", "", False, True)
  1097.  
  1098.     Comms.Send Mid(subj, 1, 2)+"\r"
  1099.     WaitForPrompt "PromptMain"
  1100.  
  1101.     If numpages = 0 Then
  1102.         i = 1
  1103.         Do
  1104.             Comms.Send Str$(i)+"\r"
  1105.             WaitFor Str$(i)+"\r"
  1106.             CaptureRewind 1+Len(Str$(i))
  1107.             Do
  1108.                 WaitForPrompt "Prompt"
  1109.             Loop Until PromptMatches("PromptMain") Or _
  1110.                        PromptMatches("PromptInvalid")
  1111.             i = i + 1
  1112.         Loop Until PromptMatches("PromptInvalid")
  1113.         CaptureRewind 24
  1114.     End If
  1115.  
  1116.     ' Clear up
  1117.     t.delete
  1118.     tErr.delete
  1119.     CaptureText Basic.Eoln$+"!end"+Basic.Eoln$
  1120.     Capture CAPTURE_OFF
  1121.     Terminal.CaptureStatus CAPTURE_OFF
  1122.     Terminal.Enabled = True
  1123.     Comms.Send "\r"
  1124.     WaitForPrompt "PromptMain"
  1125.  
  1126.     ' Add to import queue
  1127.     If QueueFile(Session.Service, filename, IM_DELETE) Then
  1128.         ReportSuccess id & " : Search for " & subj & " in APOnline "
  1129.     End If
  1130.     GoTop
  1131. End Sub
  1132.  
  1133. 'T:SetupWizard (subroutine) (CompuServe)
  1134. Sub SetupWizard(mailname As String, organisation As String)
  1135.     WaitForPrompt "Prompt"
  1136.     SetupOptions ""
  1137. End Sub
  1138.  
  1139. 'T:CreateAccount (subroutine) (CompuServe)
  1140. Sub CreateAccount
  1141.     WaitFor "Choice :"
  1142.     Comms.Send "1\r"
  1143.     WaitFor "#:"
  1144.     Comms.Send "ASHMOUNT\r"
  1145.     WaitFor "#:"
  1146.     Comms.Send "93006\r"
  1147.     ManualTerminal
  1148. End Sub
  1149.  
  1150. Sub EditorLineNum(t as tracker)
  1151.     SetEditorToNO = True
  1152. End Sub
  1153.  
  1154. Sub PagedOutput(t as tracker)
  1155.     SetPagedOutputToNO = True
  1156. End Sub
  1157.  
  1158. 'T:AsciiUserLog (subroutine) (CompuServe)
  1159. Sub AsciiUserLog(id As String, forum As String)
  1160.     Dim filename As String
  1161.  
  1162.     If Not GoForum(forum) Then
  1163.         LogResult "Unable to access " + forum + " to get user log"
  1164.         Exit Sub
  1165.     End If
  1166.  
  1167.     filename = StartCapture(forum + "/Sysop_Logs User_Log")
  1168.     CaptureText "Who Accessed Forum"+Basic.Eoln$
  1169.     Terminal.Enabled=False
  1170.     Terminal.Status "Collecting forum user log ... Please wait"
  1171.     Comms.Send "ulog\r"
  1172.     WaitForPrompt "Prompt"
  1173.     CaptureRewind 7
  1174.     CaptureText Basic.Eoln$+"!end"+Basic.Eoln$
  1175.     Capture CAPTURE_OFF
  1176.     Terminal.Enabled=True
  1177.     ' Add to import queue
  1178.     If QueueFile(Session.Service, filename, IM_DELETE) Then
  1179.         ReportSuccess id & " : User log collected from " & forum
  1180.     Else
  1181.         ReportSuccess id & " : User log for forum " & forum & " failed"
  1182.     End If
  1183. End Sub
  1184.  
  1185.