Jump to content

Error: Unable To Open File, The Maximum Number Of

Recommended Posts

How do I resolve this issue, I dont think I am doing anything wrong in the script. Take a look

The Error:_____________________________________________________

AutoIT Error:

Line 610 (File C:\SiteSep_new.au3):

$LOG = FileOpen($LOGNAME & ".csv", 1)

Error: Unable to open file, The maximum number of open files has been exceeded.


The code:

All Variables are declared



If Not WinActive("classname=IEFrame","") Then WinActivate("classname=IEFrame","")


WinShow("classname=IEFrame","", @SW_MAXIMIZE)


If $TITLEX = $TITLE2 Then ;==>TEST Title

$DIF = Round(TimerStop($BEGIN1))


$LOGLINE=$TITLEX & "," & "OK," & $START & "," & @HOUR & ":" & @MIN & "," & $DIF & "," & $LSTOP1 & "," & $FSTOP1 & "," & $FSTOP2 & "," & $SSTOP1 & "," & $SSTOP2 & "," & $PSTOP1 & "," & $PSTOP2 & "," & $ESTOP1 & "," & $ESTOP2 & "," & $BSTOP1

$LOG = FileOpen($LOGNAME & ".csv", 1) ;LINE 610

If $LOG = -1 Then ;==> Check Log

MsgBox(0, "Error", "Unable to open LOG.")

EndIf ;==> Check Log

FileWriteLine($LOG, $LOGLINE)





EndIf ;==>TEST Title

EndFunc ;==>SUCCESS

Link to post
Share on other sites

There is a limit to the number of open files you can have, that limit is set at 64. Are you opening any other files in your script? Are you opening a file in a loop (While, For, Do) and maybe missing a FileClose() somewhere? Something in your script has caused a bunch of files to be open and you can't open any more.

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
  • Recently Browsing   0 members

    No registered users viewing this page.

  • Create New...