Author | Message | Time |
---|---|---|
DarkOne | I'm trying to add a new feature to my bot which involves updating an HTM document. I'm trying to have the bot check through an HTM document and add all lines to an array. After this has been completed, it will then look for a specific string within the document and convert it to a null string along with the 3 lines above and two lines below. Here's what I have so far: [code] Public Function HTMLGenerate_Delete() Dim strLine() As String Dim w, nLines As Integer nLines = 0 Open App.Path & "\channel.htm" For Input As #1 Do While EOF(1) = False nLines = nLines + 1 Line Input #1, strLine(nLines) Loop Close #1 Open App.Path & "\channel.htm" For Output As #1 For w = 1 To nLines If strLine(w) = "test" Then strLine(w - 3) = "" strLine(w - 2) = "" strLine(w - 1) = "" strLine(w) = "" strLine(w + 1) = "" strLine(w + 2) = "" Else Print #1, strLine(w) End If Next Close #1 End Function [/code] Any help would be greatly appreciated. | February 10, 2003, 11:04 PM |
Grok | Much easier to use XMLDOM. | February 11, 2003, 12:49 PM |