Results 1 to 6 of 6

Thread: HEEEEEEEEELLLLLLP!!!!!!

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Jan 2000
    Posts
    83

    Post

    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

  2. #2
    Frenzied Member HarryW's Avatar
    Join Date
    Jan 2000
    Location
    Heiho no michi
    Posts
    1,827

    Post

    Check some of the recent posts on hex files - there's been quite a lot of rambling about them recently

  3. #3

    Thread Starter
    Lively Member
    Join Date
    Jan 2000
    Posts
    83

    Post

    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

  4. #4
    Member
    Join Date
    Jul 1999
    Location
    J-ville, NC
    Posts
    54

    Post

    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




  5. #5

    Thread Starter
    Lively Member
    Join Date
    Jan 2000
    Posts
    83

    Post

    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

  6. #6
    Junior Member
    Join Date
    Jan 2000
    Posts
    21

    Post

    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
  •  



Click Here to Expand Forum to Full Width