I recently started to create a tag editor/creator for the game halo. It wasnt till just now that I have no idea how to read and write data from files. :rolleyes:

so my question is: how could i open a file with the common dialog, and have it automatically display certain offsets in certian textboxs, so for example, offset 0x04 would be in text1, 0x08 in text2 and offset 0x1C in text3.

you can contact me on AIM at DuckM45ter or just post here >_>

depends on how the origional file is formated
for instance if it reads line by line or a silgle line to eof.

dim confdat,yourfile,variable(0 to number of file lines) as string

cmdl.action = 1

yourfile = cmdl.filename
x = 0
Open yourfile For Input As #1
Do While Not EOF(1)
Line Input #1, confdat
variable(X) = confdat
X = X + 1
Loop
Close #1

will put each line as 1 line in the variable(x) array then do someting with the info to identify the information you need then feed those variables to your text boxes.

if left$(variable(1),4) = "0x08" then textbox.text = right$(varabie(1),9)

like i said it depens on how the origional file is formated and how you format the input to the variable(x) when reading the file.

note if your going to use the if then statments outside the sub rutine then make the variable array global in a modual
cause i dont know how to make them global from within the sub.

We love all information we can get, but do me a big favor. Threads, and Lazarus, should have nothing to do with each other.... so let's not resurrect dead threads.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.