yookee Posted June 11, 2009 Share Posted June 11, 2009 FileWrite($file, Chr(0)) will write nothing.For example00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F52 49 46 46 44 7C 09 00 57 41 56 45 66 6D 74 20 RIFFD|..WAVEfmt How can I write 00 to file directly? Link to comment Share on other sites More sharing options...
DCCD Posted June 11, 2009 Share Posted June 11, 2009 0 = Null character Run("hh.exe mk:@MSITStore:"&@ProgramFilesDir&"\AutoIt3\AutoIt3.chm::/html/appendix/ascii.htm") [u][font=Arial Black]M[/font]y Blog, AVSS Parts[/u][font=Arial Black]Else[/font][font=Arial Black]L[/font]ibya Linux Users Group Link to comment Share on other sites More sharing options...
Inverted Posted June 11, 2009 Share Posted June 11, 2009 (edited) If you want to append a zero to the end, then ... $F = FileOpen("testl.bin", 17) If $F = -1 Then MsgBox (0,"Error","1") $ret2 = FileWrite ($F, Chr(0)) If $ret2 = 0 Then MsgBox (0,"Error","2") Edited June 11, 2009 by Inverted Link to comment Share on other sites More sharing options...
yookee Posted June 11, 2009 Author Share Posted June 11, 2009 If you want to append a zero to the end, then ... $F = FileOpen("testl.bin", 17) If $F = -1 Then MsgBox (0,"Error","1") $ret2 = FileWrite ($F, Chr(0)) If $ret2 = 0 Then MsgBox (0,"Error","2") Mm, mode 16 is key point. THX. Link to comment Share on other sites More sharing options...
Inverted Posted June 11, 2009 Share Posted June 11, 2009 Yep, essentially it's 16+1 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