PDA

Click to See Complete Forum and Search --> : HEEEEEEEEELLLLLLP!!!!!!


Iceman
Jan 17th, 2000, 03:36 AM
Ok so if i got your attention how do i input hex data into a file? I will be eternally greatful to whoever answers this

later,
Iceman

P.S.sorry about the title just tying to get responses as this is my 3rd try

HarryW
Jan 17th, 2000, 03:49 AM
Check some of the recent posts on hex files - there's been quite a lot of rambling about them recently :D

Iceman
Jan 17th, 2000, 04:47 AM
that really doesn't help

could you either a. give a link or b. an example?

the help files really dont' help worth **** is all

later,
Iceman

X_Darknight_X
Jan 17th, 2000, 05:14 AM
I don't know if this is what you want but here ya go:

Numfile# = FreeFile
Open "C:\Location" for Input As NumFile#
Input NumFile#, Hex(Text1.Text)
Close NumFile#

That'll save the hex value of Text1

------------------
David Underwood
Cannabatech Corporation

ICQ - 14028049 (http://www.icq.com/14028049)
E-mail - darknight23@hotmail.com

Iceman
Jan 17th, 2000, 09:16 AM
that didn't seem to work.... gave me an error

What i want to do is create a file such as what you get when you look at a file through a hex editor. Is that specific enough?
I just want to create a file like you see with a hex editor thats all and the open/close isn't a problem anymore

later,
Iceman

ivyl
Jan 17th, 2000, 08:17 PM
Try the following code. It saves the data in test.txt as hex in hexfile.txt

The source file doesn't have to be a textfile, it can be any type of file.

Dim x As String * 1
Open "c:\test.txt" For Binary As #1
Open "c:\hexfile.txt" For Output As #2
While Not EOF(1)
Get #1, , x$
Print #2, Hex$(Asc(x$)),
Wend
Close