Joke758 Posted September 12, 2006 Share Posted September 12, 2006 (edited) Why when I do this it's working: Local $ah = String(BinaryString(FileRead("C:\test.zip"))) FileWrite ( "C:\hey.txt", BinaryString ( $ah ) ) ;Working oÝ÷ ٩ݧ!Ú-+"·lp¢¹"®¶sdÆö6Âb33c¶Ò7G&ær&æ'7G&ærfÆU&VBgV÷C´3¢b3#·FW7Bç¦gV÷C² ¤fÆUw&FRgV÷C´3¢b3#¶WçGBgV÷C²Âb33c¶ ¢b33c¶ÒfÆU&VBgV÷C´3¢b3#¶WçGBgV÷C²¤fÆUw&FRgV÷C´3¢b3#¶W"çGBgV÷C²Â&æ'7G&ærb33c¶£´FöW6âb33·Bv÷&° Don't say: Just use the first script.. duh..! because I need the second script to work for some reasons. Help please. Thank you. Edited September 12, 2006 by Joke758 [u]My Programs:[/u]Word Search Creator - Make your own Word SearchShortHand - Hide a secret message in a jpg fileHex Editor - Edit your Binary fileIncrease file size - Increase the size of any filesArt Generator - A program that generate random picture[u]My Functions:[/u]16-Bits Hash - My Hash function similar to MD5Probabilities - My probabilities function (factorial, permuation, combination)_GetDate() - Convert a date to a day of the week_Base(), _Dec() - Convert a number in any base (bin, oct, hex, dec). Create your own! Link to comment Share on other sites More sharing options...
Joke758 Posted September 12, 2006 Author Share Posted September 12, 2006 bump [u]My Programs:[/u]Word Search Creator - Make your own Word SearchShortHand - Hide a secret message in a jpg fileHex Editor - Edit your Binary fileIncrease file size - Increase the size of any filesArt Generator - A program that generate random picture[u]My Functions:[/u]16-Bits Hash - My Hash function similar to MD5Probabilities - My probabilities function (factorial, permuation, combination)_GetDate() - Convert a date to a day of the week_Base(), _Dec() - Convert a number in any base (bin, oct, hex, dec). Create your own! Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted September 12, 2006 Moderators Share Posted September 12, 2006 You only posted 20 minutes before you bumped, give it a couple of hours at aleast. What is your problem with what it is doing... showing code is wonderful and I encourage it, but explaining what you expect the code to do is also a great way to receive help. Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
Paulie Posted September 12, 2006 Share Posted September 12, 2006 Don't say: Just use the first script.. duh..!Just use the first script Well what part of the second one doesn't work? what parts need changeddoes it result in something, but its just not how you like it? Link to comment Share on other sites More sharing options...
jpm Posted September 12, 2006 Share Posted September 12, 2006 As I understand you just want to make a copy of the .zip under .txt so FileCopy is the appropriate function. Back to your understanding of the string, binarystring and fileread,filewrite only fileread,filewrite is needed as filreread return a binarystring.Local $ah = FileRead("C:\test.zip") FileWrite ( "C:\hey.txt", $ah ) When you are using String to a binarystring you will troncate the binarystring to the first chr(0), so the remaining part will be lost Link to comment Share on other sites More sharing options...
Joke758 Posted September 12, 2006 Author Share Posted September 12, 2006 Local $ah = String(BinaryString(FileRead("C:\test.zip"))) FileWrite ( "C:\hey.txt", BinaryString ( $ah ) ) ;Working, hey.txt is the same thing as test.zipoÝ÷ ØéßÙe{ej)æÊÇ¥}·µêÖéÈ®éíçâ®Ëlr¸©¶²·b²Ø^±©¶§«-zËsî·^îØ^±ç(Ú'z²ÚÜmÊej)ç¢Øb7öjkzÛr²êÞÝý±ªk¡¹^Ø^²ÚâÞq«¬{Múj§wMú¦Ë.¦,yÛhmëazƦyh^¬x§j¼¶¸§íí7é¨b· +ÆÞq«¬z+kzÛ«Ø^±©¶§«-zËs!z|¨º·§jg¢¶Ú-ÆÖî·^¬y¸§j¼¬¶¸§ôߨZi¨ën®y趧hrÓ~©ÝÓ~¡i¦¢²Ø^±©¶§z0q©È~,mërݱÊâ¦Ûh«Þ춷mëëax²×¬·8©N§Æ®¶s`¤Æö6Âb33c¶Ò7G&ær&æ'7G&ærfÆU&VBgV÷C´3¢b3#·FW7Bç¦gV÷C² ¤fÆUw&FRgV÷C´3¢b3#¶WçGBgV÷C²Âb33c¶ ¢b33c¶ÒfÆU&VBgV÷C´3¢b3#¶WçGBgV÷C²¤fÆUw&FRgV÷C´3¢b3#¶W"çGBgV÷C²Â&æ'7G&ærb33c¶£´FöW6âb33·Bv÷&²W"çGB2Æâ [u]My Programs:[/u]Word Search Creator - Make your own Word SearchShortHand - Hide a secret message in a jpg fileHex Editor - Edit your Binary fileIncrease file size - Increase the size of any filesArt Generator - A program that generate random picture[u]My Functions:[/u]16-Bits Hash - My Hash function similar to MD5Probabilities - My probabilities function (factorial, permuation, combination)_GetDate() - Convert a date to a day of the week_Base(), _Dec() - Convert a number in any base (bin, oct, hex, dec). Create your own! Link to comment Share on other sites More sharing options...
jpm Posted September 12, 2006 Share Posted September 12, 2006 I didn't succeed to explain the difference between yours scripts and mine. Try mine I should work as your one which is working. Why? Read the doc about Fileread,filewrite you will notice that those functions works with binarystring. The one which is not working is because when you use the String function you truncate the binarystring to the first character equal to chr(0). that's the reason why it is not working 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