obrienj Posted March 29, 2011 Share Posted March 29, 2011 (edited) I am drawing a blank as to how to process the subject file in AutoIt. I know how to do it in C but I don't have a compiler available right now. I have a file that is made up of variable length elements that have a single byte binary length followed by that length of displayable characters. For example: 0x053132333435024142 which should yield "12345" and "AB" I need to "walk the file" extracting all of the individual displayable data. Any one have an example of how to do this? I am getting all wound up with reading the file in binary, BinaryToString ..... Regards, Jim Edited March 29, 2011 by obrienj Link to comment Share on other sites More sharing options...
PsaltyDS Posted March 30, 2011 Share Posted March 30, 2011 (edited) Read the whole file with FileOpen() in binary mode, and then use BinaryMid(), see help file. Even better open the file in binary mode, the FileRead() in a loop getting one byte, then $iLen bytes, then one byte, etc. Edited March 30, 2011 by PsaltyDS Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now