|
-
October 6th, 2004, 11:07 PM
#1
Get current Line
I'm trying to read both binary and text information from a text file. The following code shows what I am doing but I need to be able to keep moving through the text. When I open for Input a second time I am reset to the first line of the text file. What can I throw in there to keep it moving along properly through each line of the text file without repeating lines? Also, I'm not sure if I am getting the proper line when I open for binary read. What can I put after "Get #1," to ensure I am getting the proper line?
Open SelectedFile For Input As #1
Do Until EOF(1)
If gettingPicture = True Then
Close #1
Dim mynewStrLine() As Byte
Open SelectedFile For Binary Access Read As #1
ReDim mynewStrLine(LOF(1))
Get #1, , mynewStrLine
gettingPicture = False
Close #1
Set picInsert(i) = LoadPicture(App.Path & "\myTempPic.txt")
Open SelectedFile For Input As #1
'(get onto proper line. How??)
Else
Line Input #1, strLine
GetField
If InStr(strLine, "End of Report:") > 0 Then
'this was the last line
Exit Do
End If
End If
Loop
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|