Search the Community
Showing results for tags 'raw bytes'.
-
Hi guys, I've been at this for a little while, so I thought I would turn to the community for what should be a simple answer to my problem. I want to write raw data to a file. Now, when I say raw data, I mean I want to write exactly the bytes I want in the file, not the hex equivalant of the characters I send. To be clearer, let me show you me code and explain what's wrong with it: $fOpen = FileOpen(@DesktopDir&"\icons.txt",18) For $d = 15 To 15 For $c = 12 To 12 For $b = 0 To 15 For $a = 0 To 15 $temp = binary(Hex($b, 1) & Hex($a, 1) & Hex($c, 1) & Hex($d, 1)) FileWrite($fOpen,$temp) Next Next Next Next FileClose($fOpen) (I can't post in the code box right now due to a poor internet connection. Sorry guys.) Well I've tried different flags or ways about converting the 4 letter hex code into binary so it will write to the file byte by byte. Nothing has worked so far. To be clear. I'm looking specifically to write raw data to a file; not the data equivalant of the text I am writing. i.e. 4E4F is the equivalant to "NO" in a hex editor. I want to write "4E4F" NOT the Hex equivalant. Thanks before hand for the help guys.