Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

Reading saved file

Posted on 2003-10-30
8
143 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
ID: 9655344
stupid hotlinking, try this one: http://efba.0catch.com/efba2.htm
0
 
LVL 50

Accepted Solution

by:
Ryan Chong earned 400 total points
ID: 9655404
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
ID: 9655667
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
Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

 

Author Comment

by:nyk52687
ID: 9656864
is it like a standard encoding or a custom encoding?
0
 
LVL 14

Expert Comment

by:aelatik
ID: 9656892
can't tell
0
 

Author Comment

by:nyk52687
ID: 9656916
hmm...
0
 

Author Comment

by:nyk52687
ID: 9660235
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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
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…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

839 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