-
Jan 17th, 2000, 04:36 AM
#1
Thread Starter
Lively Member
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
-
Jan 17th, 2000, 04:49 AM
#2
-
Jan 17th, 2000, 05:47 AM
#3
Thread Starter
Lively Member
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
-
Jan 17th, 2000, 06:14 AM
#4
Member
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
E-mail - darknight23@hotmail.com
-
Jan 17th, 2000, 10:16 AM
#5
Thread Starter
Lively Member
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
-
Jan 17th, 2000, 09:17 PM
#6
Junior Member
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
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|