Re: [RESOLVED] - Search Text File
How can i do it to search more lines then one?
Re: [RESOLVED] - Search Text File
that will search each line one at a time.
casey.
Re: [RESOLVED] - Search Text File
I think you need to explain it better. If this is solved (which I don't think it is since the bottom post has a new question on it), please state it better. I personally don't understand.
Phreak
Re: [RESOLVED] - Search Text File
Heres what I have
VB Code:
Private Sub tSearch_Timer()
txt.Caption = "Searching for ukf_infantry.pbo..."
Dim CSIDL As Long
Dim DefPath As String
DefPath = GetFolderPath(CSIDL_PROGRAM_FILES)
DefFold = DefPath & "\Codemasters\OperationFlashpoint\@ECP\Addons\"
Dim tempStr As String, Ret As Long
tempStr = String(MAX_PATH, 0)
Ret = SearchTreeForFile(DefFold, HOWD I PUT OUTPUT HERE??, tempStr)
If Ret <> 0 Then
With lst
.AddItem HOWD I PUT OUTPUT HERE?? & " - " & DefFold & "ukf_infantry"
End With
Else
End If
tSearch.Enabled = False
End Sub
Private Sub txtSearch_Click()
txtSearch.Enabled = False
Open (App.Path & "\flz.22") For Input As #1
Do While Not EOF(1)
Line Input #1, TLine
Loop
Close #1
defFol.Enabled = False
tSearch.Enabled = True
End Sub
I want it to search for the first line, third line, fifth line etc of what is in the text file. So basically, can i turn each line found from the text file into a global string?
Re: [RESOLVED] - Search Text File
as you are going through the loop, have a counter keeping record of which line you are on then check if the number is odd, if it is then add it to the string.
do you want an array or one long string of what you find ?
casey.