Solved

Reading saved file

Posted on 2003-10-30
8
144 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
[X]
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
  • 4
  • 2
8 Comments
 

Author Comment

by:nyk52687
ID: 9655344
stupid hotlinking, try this one: http://efba.0catch.com/efba2.htm
0
 
LVL 51

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
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

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

Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

Question has a verified solution.

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

The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
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…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
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…

726 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