I'm having trouble reading a file. The file is a core file from Microsoft's now debunked but open source game Allegiance that was written in C/C++; I don't know C/C++. (On a side note: A few users kept the game alive and running, see http://www.freeallegiance.org/forums/index.php?act=home )
I have tried:
But it gives an error.VB Code:
Dim strText As String Dim intFile As Integer intFile = FreeFile() Open App.Path + "\dn_000450.igc" For Input As #intFile MsgBox (LOF(intFile)) MsgBox (EOF(intFile)) strText = Input$(LOF(intFile), intFile) Close #intFile
I have also tried:
But it only appeared to read part of the file.VB Code:
Dim sfile As String sfile = App.Path + "\dn_000450.igc" Dim myArray() As String ReDim myArray(0) Open sfile For Input As #1 Do Until EOF(1) Input #1, myArray(UBound(myArray)) ReDim Preserve myArray(UBound(myArray) + 1) Loop ReDim Preserve myArray(UBound(myArray) - 1) Close #1 'Check to see if everything was read For i = 0 To UBound(myArray()) txt1.Text = txt1.Text & myArray(i) Next i
How do I read the file and extract usable data from it??
Additional information:
Currently I'm reading the .CSV file output from a program called CoreDump that was written in Python, but the current version is buggy and doesn’t output everything. Currently, I don't know any Python and would like to deal with just the one core file instead of the several CSV files that CoreDump outputs.
If anyone wants me to, I will post the Python source code to CoreDump.




Reply With Quote