Nymphetamine Posted February 9, 2014 Share Posted February 9, 2014 Hi all I am wondering if in autoit it's possible to get the structure of a file, choose a byte and edit it directly from the autoit program. Maybe with a GUI and a box If for example i want to take the 4th byte of a file, is that possible to turn this 4th byte in a box and edit it easily? Link to comment Share on other sites More sharing options...
JohnOne Posted February 9, 2014 Share Posted February 9, 2014 I believe it is possible, yes. AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
Nymphetamine Posted February 9, 2014 Author Share Posted February 9, 2014 I believe it is possible, yes. But i guess it's advanced scripting, not something that a newbie can do right Link to comment Share on other sites More sharing options...
Gianni Posted February 9, 2014 Share Posted February 9, 2014 (edited) you should read help on this commands: FileOpen FileSetPos FileGetPos FileRead p.s. search for "Hex editor" in autoit advanced search for some examples edit: >here a very simple example to use that commands Edited February 9, 2014 by PincoPanco Chimp small minds discuss people average minds discuss events great minds discuss ideas.... and use AutoIt.... Link to comment Share on other sites More sharing options...
Nymphetamine Posted February 9, 2014 Author Share Posted February 9, 2014 (edited) you should read help on this commands: FileOpen FileSetPos FileGetPos FileRead p.s. search for "Hex editor" in autoit advanced search for some examples edit: >here a very simple example to use that commands This can really help me,i'll look into it Isn't there an example script about it? I need to make a tool which reads a byte of a file, then i want to transfer this byte in a box and edit it manually. Edited February 9, 2014 by Nymphetamine Link to comment Share on other sites More sharing options...
nullschritt Posted February 9, 2014 Share Posted February 9, 2014 This can really help me,i'll look into it Isn't there an example script about it? I need to make a tool which reads a byte of a file, then i want to transfer this byte in a box and edit it manually. If you're talking about binary data you'll have to also use binarytostring() and binary() on the data before/after editing. Link to comment Share on other sites More sharing options...
Gianni Posted February 9, 2014 Share Posted February 9, 2014 This can really help me,i'll look into it Isn't there an example script about it? I need to make a tool which reads a byte of a file, then i want to transfer this byte in a box and edit it manually. An very minimalist example to read 4° byte from any file $File = FileOpenDialog('Please choose file', '', 'All files (*.*)', 1) $myfile = FileOpen($File, 16) ; open file in binary mode Local $x = 3 ; we will read 4° byte first byte is nr.0 (0 based) FileSetPos($myfile, $x, 0) ; position "cursor" to byte nr $x $byte = FileRead($myfile, 1) ; read 1 byte (and autoincrement position) MsgBox(0, "", "Value of byte in position " & $x & " is " & $byte) Chimp small minds discuss people average minds discuss events great minds discuss ideas.... and use AutoIt.... Link to comment Share on other sites More sharing options...
Nymphetamine Posted February 16, 2014 Author Share Posted February 16, 2014 (edited) An very minimalist example to read 4° byte from any file $File = FileOpenDialog('Please choose file', '', 'All files (*.*)', 1) $myfile = FileOpen($File, 16) ; open file in binary mode Local $x = 3 ; we will read 4° byte first byte is nr.0 (0 based) FileSetPos($myfile, $x, 0) ; position "cursor" to byte nr $x $byte = FileRead($myfile, 1) ; read 1 byte (and autoincrement position) MsgBox(0, "", "Value of byte in position " & $x & " is " & $byte) And how can i put the number of this 4th value in a box and edit it? I would like to make a GUI window with some boxes to read a byte and make it editable from it. And then save the file with the edited byte Edited February 16, 2014 by Nymphetamine 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