-
Posts
7,103 -
Joined
-
Days Won
88
Content Type
Forums
Downloads
Forum Articles
Events
Everything posted by TheDcoder
-
@Chimaera Yep, unrar is a little easier to use & has the ability to extract files from the modern v5 archives... v5 is not free >:(
-
I use 7za all the time!
-
[Solved] Error allocating memory for a 6 MB file
TheDcoder replied to TheDcoder's topic in AutoIt General Help and Support
The footer length is variable, that is why I iterate. I would be happy to provide more info, don't hesitate to ask -
Sorry man, I forgot that you are new
-
[Solved] Error allocating memory for a 6 MB file
TheDcoder replied to TheDcoder's topic in AutoIt General Help and Support
@water Oh ! -
[Solved] Error allocating memory for a 6 MB file
TheDcoder replied to TheDcoder's topic in AutoIt General Help and Support
https://en.wikipedia.org/wiki/Ada_Lovelace -
[Solved] Error allocating memory for a 6 MB file
TheDcoder replied to TheDcoder's topic in AutoIt General Help and Support
Your grandma is Augusta Ada!? -
@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
-
@kcvinu Here is a reminder
-
@kcvinu It is not a prank, Did forgot to change your language to English (India) while installing windows?
-
@kcvinu You live in US? I was in the impression that you live in Kerala
-
[Solved] Error allocating memory for a 6 MB file
TheDcoder replied to TheDcoder's topic in AutoIt General Help and Support
@water . I normally process larger files, this was tiny compared to them -
[Solved] Error allocating memory for a 6 MB file
TheDcoder replied to TheDcoder's topic in AutoIt General Help and Support
Any suggestions? -
Works for me
-
[Solved] Error allocating memory for a 6 MB file
TheDcoder replied to TheDcoder's topic in AutoIt General Help and Support
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 -
[Solved] Error allocating memory for a 6 MB file
TheDcoder replied to TheDcoder's topic in AutoIt General Help and Support
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! -
@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
-
[Solved] Error allocating memory for a 6 MB file
TheDcoder replied to TheDcoder's topic in AutoIt General Help and Support
@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 -
[Solved] Error allocating memory for a 6 MB file
TheDcoder replied to TheDcoder's topic in AutoIt General Help and Support
@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 -
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
-
Did not saw that
-
@junkew Use strings as keys: "DD/MM/YY" "12/02/16" ; Example key
-
They is not datatype called date