Jump to content
Sign in to follow this  
tammelinn

FileWriteLine limit?

Recommended Posts

tammelinn

Apologies for another newbie question.

$outputfile = "output.txt"

FileOpen($outputfile, 1)
FileWriteLine($outputfile, $text)
FileClose($outputfile)

Once $outputfile reaches about 30k, no more text is written.

Is this a fixed limit? Can it be increased? I couldn't find any mention of limits in the helpfiles for these functions, and only a few mentions of file limits in the forums, when .ini files were being discussed.

Share this post


Link to post
Share on other sites
MadBoy

Once $outputfile reaches about 30k, no more text is written.

Is this a fixed limit? Can it be increased? I couldn't find any mention of limits in the helpfiles for these functions, and only a few mentions of file limits in the forums, when .ini files were being discussed.

There's no limit on that that. The problem is you're using FileClose wrong. So actually the file is Opened but not closed and autoit reaches its limit. For me limit was at 508 openings.

$outputfile = "output.txt"

For $a = 1 To 40000
    TestFunc($a)
Next

Func TestFunc($text)
    $file = FileOpen($outputfile, 1)
    $status = FileWriteLine($file, $text)
    ConsoleWrite(@CR & $text & " - " & $status)
    FileClose($file)
EndFunc   ;==>TestFuncoÝ÷ Ù'~ò¢êìzWÚÚîØb±.Â)ebqëajØ­²Ú)±«l¢g©¢)íjw]¡ë'·p®+^Þéz»ºÚ"µÍ ÌÍÛÝ]][HH   ][ÝÛÝ]]  ][ÝÂÜ    ÌÍØHHHÈ
Ý[Ê   ÌÍØJB^[ÈÝ[Ê   ÌÍÝ^
B[[  ÌÍÛÝ]][KJB  ÌÍÜÝ]ÈH[]S[J    ÌÍÛÝ]][K    ÌÍÝ^
BÛÛÛÛUÜ]JÔ    [È ÌÍÝ^ [È ][ÝÈH ][ÝÈ  [È ÌÍÜÝ]ÊB[PÛÜÙJ   ÌÍÛÝ]][JB[[ÈÏOIÝÕÝ[

My little company: Evotec (PL version: Evotec)

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×