zasxes Posted March 22, 2004 Posted March 22, 2004 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 Func SUCCESS() WinWait("classname=IEFrame") If Not WinActive("classname=IEFrame","") Then WinActivate("classname=IEFrame","") WinWaitActive("classname=IEFrame","") WinShow("classname=IEFrame","", @SW_MAXIMIZE) $TITLE2=WinGetTitle("","") If $TITLEX = $TITLE2 Then ;==>TEST Title $DIF = Round(TimerStop($BEGIN1)) $DIF=$DIF/1000 $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) FileClose($LOG) WinClose($TITLE2) Else WinClose($TITLE2) EndIf ;==>TEST Title EndFunc ;==>SUCCESS
Valik Posted March 22, 2004 Posted March 22, 2004 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.
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