Shafayat Posted October 13, 2008 Share Posted October 13, 2008 Hello guysI'm again here to beg for help. Here is a simple flow chart of what I need to achieve.I've a BINARY file: (e.g. $file = "C:\my.bin" )I need to read total data in a variable (e.g. $totaldatafrmfile) (as HEX value) Then, I've two String Values which need to be converted to HEX value. ($strv1 and $strv2 to $hexofstrv1 and $hexofstrv2)Now, I need the position of the second occurrence of $hexofstrv1 in $totaldatafrmfile (probably with StringInStr) And the 1st occurrence of $hexofstrv2Next, I need to copy the binary data from $totaldatafrmfile that is within $hexofstrv1 to $hexofstrv2 + Lenght of $hexofstrv2 and save to a new binary file. (e.g. C:\Cropped.bin)Please help me out. If possible give the complete code. Error handling (in case StringInStr returns 0) not required.RegardsShafayat [Not using this account any more. Using "iShafayet" instead] Link to comment Share on other sites More sharing options...
Shafayat Posted October 13, 2008 Author Share Posted October 13, 2008 Can't someone help me? [Not using this account any more. Using "iShafayet" instead] Link to comment Share on other sites More sharing options...
martin Posted October 13, 2008 Share Posted October 13, 2008 Can't someone help me?Can you show something you have tried so far even if it fails, and give a sample file to read? Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script. Link to comment Share on other sites More sharing options...
Shafayat Posted October 13, 2008 Author Share Posted October 13, 2008 Here goes the my work. (The binary file (main.bin) is RARed because of upload extension restriction). I need to write the Blocked Part (in the attached image) to a new file.BinTest.au3Main.rar [Not using this account any more. Using "iShafayet" instead] Link to comment Share on other sites More sharing options...
Shafayat Posted October 14, 2008 Author Share Posted October 14, 2008 No one helped, eh. Well... I really like this forum. Regards Shafayat [Not using this account any more. Using "iShafayet" instead] Link to comment Share on other sites More sharing options...
Marlo Posted October 14, 2008 Share Posted October 14, 2008 Maybe no one has helped yet because no one can Click here for the best AutoIt help possible.Currently Working on: Autoit RAT Link to comment Share on other sites More sharing options...
Shafayat Posted October 14, 2008 Author Share Posted October 14, 2008 I bet, thats not the truth. They knew I could succeed myself if I try for two hours (and I did so) Regards Shafayat [Not using this account any more. Using "iShafayet" instead] 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