Solved

Reading saved file

Posted on 2003-10-30
8
140 Views
Last Modified: 2010-05-03
I am looking to write a program that can edit data in a file saved from a game I have. I was wondering if anyone has seen this format before, or have any ideas/sample code to help get it into a more readable/editable format.

http://efba.0catch.com/EFBA2.zip

thanks, chris
0
Comment
Question by:nyk52687
  • 4
  • 2
8 Comments
 

Author Comment

by:nyk52687
Comment Utility
stupid hotlinking, try this one: http://efba.0catch.com/efba2.htm
0
 
LVL 49

Accepted Solution

by:
Ryan Chong earned 400 total points
Comment Utility
Try use the below function to Read, and Write to a file:

Public Function ReadFileText(ByVal FileName As String) As String
    On Error GoTo EHandler
    Dim Handle As Integer
    Handle = FreeFile
    Open FileName For Input As #Handle
        ReadFileText = Input$(LOF(Handle), Handle)
        On Error Resume Next
    Close #Handle
    Exit Function
EHandler:
    On Error Resume Next
    Close #Handle
End Function

Public Sub WriteFileText(ByVal FileName As String, ByVal Source As String, Optional noCrlf As Boolean = False)
    On Error GoTo EHandler
    Dim Handle As Integer
    Handle = FreeFile
    Open FileName For Output As #Handle
        If noCrlf Then
            Print #Handle, Source;
        Else
            Print #Handle, Source
        End If
        On Error Resume Next
    Close #Handle
    Exit Sub
EHandler:
    On Error Resume Next
    Close #Handle
End Sub

After reading your content of file, you may need to split it to get the values from the file.

Hope this helps
0
 
LVL 14

Expert Comment

by:aelatik
Comment Utility
To read and write a file you can use the code ryancys gave you. But the file youre willing to open is a problem.
There is some type of encoding in that file. If you don't know how to decode it you can't show it in a readable/editable format.
0
Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

 

Author Comment

by:nyk52687
Comment Utility
is it like a standard encoding or a custom encoding?
0
 
LVL 14

Expert Comment

by:aelatik
Comment Utility
can't tell
0
 

Author Comment

by:nyk52687
Comment Utility
hmm...
0
 

Author Comment

by:nyk52687
Comment Utility
if anyone has some free time and would like to write a small app, that would be great. i could boost the points up to 475 from 400 but thats it cuz i only have 475 points...i can't think of any other way to repay an expert

thanks in advance, chris
0

Featured Post

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

728 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now