Solved

Reading saved file

Posted on 2003-10-30
8
145 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 52

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
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.

 

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

Salesforce Has Never Been Easier

Improve and reinforce salesforce training & adoption using WalkMe's digital adoption platform. Start saving on costly employee training by creating fast intuitive Walk-Thrus for Salesforce. Claim your Free Account Now

Question has a verified solution.

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

Introduction While answering a recent question (http://www.experts-exchange.com/Q_27402310.html) in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code o…
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…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
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…

691 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