Jump to content

FileWriteLine limit?


 Share

Recommended Posts

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.

Link to comment
Share on other sites

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)

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...