Jump to content

TheDcoder

Active Members
  • Posts

    7,103
  • Joined

  • Days Won

    88

Everything posted by TheDcoder

  1. @Chimaera Yep, unrar is a little easier to use & has the ability to extract files from the modern v5 archives... v5 is not free >:(
  2. I use 7za all the time!
  3. The footer length is variable, that is why I iterate. I would be happy to provide more info, don't hesitate to ask
  4. Sorry man, I forgot that you are new
  5. https://en.wikipedia.org/wiki/Ada_Lovelace
  6. @kcvinu The path is hard coded, You can change your system locale instead : http://windows.microsoft.com/en-us/windows/change-system-locale#1TC=windows-7
  7. @kcvinu Here is a reminder
  8. @kcvinu It is not a prank, Did forgot to change your language to English (India) while installing windows?
  9. @kcvinu You live in US? I was in the impression that you live in Kerala
  10. @water . I normally process larger files, this was tiny compared to them
  11. Works for me
  12. This is the code which worked for me : #include <FileConstants.au3> #include <MsgBoxConstants.au3> #include <StringConstants.au3> Local Const $CHUNK = 1024 Local $hFile = FileOpen(@ScriptDir & '\test.bin', $FO_APPEND) Local $iCurrentPos = 0 Local $bFileSetPos = True Do $iCurrentPos -= $CHUNK $bFileSetPos = FileSetPos($hFile, $iCurrentPos, $FILE_END) $vData = FileRead($hFile, $iCurrentPos) $vData = BinaryToString($vData) $iStringPos = StringInStr($vData, "Test", $STR_NOCASESENSEBASIC) Until Not ($iStringPos = 0) Or $bFileSetPos = False FileClose($hFile) MsgBox($MB_OK, "Success", $iStringPos) But I still don't understand why there was a memory allocation error in my faulty code
  13. I am trying to read the footer of a file (in this case "Test" indicates where the footer starts from) The code is from a function in my original code, I returned the read data. Yep, it is necessary to read the footer Silly me! That fixed the problem Thanks water! You solved my problem by asking questions! That is simply great!
  14. @Alzri I think you need to rename your library to something else. Since AutoIt 4 is reserved for future generation of AutoIt You can edit your topic by clicking "edit" located in the bottom left corner of your posts
  15. @water Huh? I remember that FileRead reads from the position set by FileSetPos, my previous version of code just did that. Even if it did read the whole file, I think it would be easy to store 6 MB of data... This is my test script which I use to read the whole file: ConsoleWrite(FileRead(@ScriptDir & '\test.bin')) MsgBox(0,0,0) I tried that now, I set the number of bytes to read to $iCurrentPos, Now for some reason the script is looping indefinitely. TD
  16. @water Huh? I remember that FileRead reads from the position set by FileSetPos, my previous version of code just did that. Even if it did read the whole file, I think it would be easy to store 6 MB of data... This is my test script which I use to read the whole file: ConsoleWrite(FileRead(@ScriptDir & '\test.bin')) MsgBox(0,0,0) I tried that now, I set the number of bytes to read to $iCurrentPos, Now for some reason the script is looping indefinitely. TD
  17. Hello! I am having problem with using file read... Here is my code: #include <FileConstants.au3> #include <MsgBoxConstants.au3> #include <StringConstants.au3> Local Const $CHUNK = 1024 Local $hFile = FileOpen(@ScriptDir & '\test.bin', $FO_APPEND) Local $iCurrentPos = 0 Do $iCurrentPos += $CHUNK $bFileSetPos = FileSetPos($hFile, $iCurrentPos, $FILE_END) $vData = FileRead($hFile) $vData = BinaryToString($vData) MsgBox(0, 0, $vData) $iStringPos = StringInStr($vData, "Test", $STR_NOCASESENSEBASIC) Until Not ($iStringPos = 0) Or $bFileSetPos = False FileClose($hFile) MsgBox($MB_OK, "Success", $iStringPos) Here is the 6 MB file: <Attachment Deleted> Thanks in Advance! TD
  18. Did not saw that
  19. @junkew Use strings as keys: "DD/MM/YY" "12/02/16" ; Example key
  20. They is not datatype called date
  21. This is what caused the problem: Why did I insert a @CRLF? Because of the code in this post: I was too lazy! I am tired now A big thanks to you @water!
×
×
  • Create New...