Cyber Posted November 28, 2008 Share Posted November 28, 2008 Hi!I must do read a filethe code is simple:$filename = "D:\ter\TE.txt"$timer = TimerInit()$SuperMegaGigaFile = FileRead($filename)MsgBox(0,"",Round(TimerDiff($timer)/1000))The problem?The file size of the file is: 460mtext file Console Browse: Navigate on the WEB in a textual consoleMultiPing!: Show computer on the lan and/or show the local/remote task, ALL animated!KillaWin: Event executingCryptPage: Crypt your webpage and show only with key Link to comment Share on other sites More sharing options...
dbzfanatic Posted November 28, 2008 Share Posted November 28, 2008 To read a file that large you'd need roughly 2GB of RAM to run effectively. How much do you have? There are also threads on reading files by parts through buffers. Try one of those. Go to my website. | My Zazzle Page (custom products)Al Bhed Translator | Direct linkScreenRec ProSimple Text Editor (STE) [TUTORIAL]Task Scheduler UDF <--- First ever UDF!_ControlPaste() UDF[quote name='renanzin' post='584064' date='Sep 26 2008, 07:00 AM']whats help ?[/quote] Link to comment Share on other sites More sharing options...
Cyber Posted November 28, 2008 Author Share Posted November 28, 2008 I have 2 gb i try with buffer, the name of the function? thanks Console Browse: Navigate on the WEB in a textual consoleMultiPing!: Show computer on the lan and/or show the local/remote task, ALL animated!KillaWin: Event executingCryptPage: Crypt your webpage and show only with key Link to comment Share on other sites More sharing options...
dbzfanatic Posted November 28, 2008 Share Posted November 28, 2008 It's not just one function, it's a custom method. Just search the forum for "file buffer" or something similar. Also you need to realize the 2GB was a guess as to how much you would need, you may need more you may not need that much. Go to my website. | My Zazzle Page (custom products)Al Bhed Translator | Direct linkScreenRec ProSimple Text Editor (STE) [TUTORIAL]Task Scheduler UDF <--- First ever UDF!_ControlPaste() UDF[quote name='renanzin' post='584064' date='Sep 26 2008, 07:00 AM']whats help ?[/quote] Link to comment Share on other sites More sharing options...
Cyber Posted November 28, 2008 Author Share Posted November 28, 2008 I try thanks Console Browse: Navigate on the WEB in a textual consoleMultiPing!: Show computer on the lan and/or show the local/remote task, ALL animated!KillaWin: Event executingCryptPage: Crypt your webpage and show only with key Link to comment Share on other sites More sharing options...
Pain Posted November 28, 2008 Share Posted November 28, 2008 Here you got the UDF that dbzfanatic were talking abouthttp://www.autoitscript.com/forum/index.ph...mp;#entry336438 Link to comment Share on other sites More sharing options...
Zedna Posted November 28, 2008 Share Posted November 28, 2008 All needed API functions for that are now included in standard AutoIt's UDF WinAPIHere is example of use:http://www.autoitscript.com/forum/index.php?showtopic=76829 Resources UDF ResourcesEx UDF AutoIt Forum Search Link to comment Share on other sites More sharing options...
AZJIO Posted April 28, 2012 Share Posted April 28, 2012 ; "Error allocating memory." ; MAX_BINARYSIZE 2,147,483,647 Maximum bytes of binary data. ; MAX_STRINGLEN 2,147,483,647 Maximum string length. $Path = "D:TmpFile.tmp" $Size = 200*1024*1024 ; 200 Mb If FileExists($Path) Then FileDelete($Path) RunWait(@Comspec&' /C fsutil file createnew "' & $Path & '" ' & $size, '', @SW_HIDE) If FileExists($Path) Then _Open($Path) Func _Open($Path) $file = FileOpen($Path, 0) $text = FileRead($file) FileClose($file) MsgBox(0, Round(FileGetSize($Path)/1024/1024, 2)&' Mb', 'Yes') EndFunc My other projects or all 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