Hi all,
Situation:
While running my script under UAC off everything runs fine like it should, but with UAC turned on (max) i get:
My script: (its pretty early into the script but i cut a few things out)
The _Aapjuh_CheckDate() function doesn't get called from within other functions and is completely standalone, none of the var's are used elsewhere except for "$RightDir" which just points to a directory.
the log does not exist yet so goes through the next function and then back to _Aapjuh_CheckDate():
i dont know if the error happens before or after it goes through _Aapjuh_MakeLog().
How can i solve this? and wuts with the UAC being involved somehow..
thanks in advance,
Aapjuh
Situation:
While running my script under UAC off everything runs fine like it should, but with UAC turned on (max) i get:
C:\Program Files\AutoIt3\Include\date.au3 (470) : ==> Recursion level has been exceeded - AutoIt will quit to prevent stack overflow.: Local $iNumDays = _DaysInMonth($asDatePart[1])
My script: (its pretty early into the script but i cut a few things out)
#include <date.au3> ;Check Date* Func _Aapjuh_CheckDate() Global $ToDay = _DateToDayValue(@YEAR,@MON,@MDAY) Global $ToDayDate = @YEAR & "/" & @MON & "/" & @MDAY Global $ToDayTime = @HOUR & ":" & @MIN & ":" & @SEC If FileExists($RightDir & "\Aapjuh Prog\Aapjuh-Log.txt") Then Dim $Year, $Month, $Day Global $WeekAgo = _DayValueToDate($ToDay-7, $Year, $Month, $Day) Global $LogDate = FileGetTime($RightDir & "\Aapjuh Prog\Aapjuh-Log.txt", 0) Global $LogDateValue = $LogDate[0] & "/" & $LogDate[1] & "/" & $LogDate[2] If @WDAY = 01 Then If $ToDayDate = $LogDateValue Then Exit 0 Else _Aapjuh_CheckFiles() Endif ElseIf @WDAY > 01 Then If $LogDateValue < $WeekAgo Then _Aapjuh_CheckFiles() Else Exit 0 EndIf EndIf ElseIf not FileExists($RightDir & "\Aapjuh Prog\Aapjuh-Log.txt") Then _Aapjuh_MakeLog() EndIf EndFunc
The _Aapjuh_CheckDate() function doesn't get called from within other functions and is completely standalone, none of the var's are used elsewhere except for "$RightDir" which just points to a directory.
the log does not exist yet so goes through the next function and then back to _Aapjuh_CheckDate():
;Making log file* Func _Aapjuh_MakeLog() If not FileExists($RightDir & "\Aapjuh Prog\Aapjuh-Log.txt") Then If FileExists("C:\Aapjuh-Log.txt") Then FileMove("C:\Aapjuh-Log.txt", $RightDir & "\Aapjuh Prog\Aapjuh-Log.txt", 9) Else FileWriteLine($RightDir & "\Aapjuh Prog\Aapjuh-Log.txt", "***Aapjuh-Prog***" & @CRLF & @CRLF & "Created by: 'Aapjuh' and 'Tigo_007'" & @CRLF & @CRLF & _ "Special Thanks To: 'The creators of AutoIt' and 'The AutoIt community'" & @CRLF & @CRLF & @CRLF & "***Log:***") FileClose($RightDir & "\Aapjuh Prog\Aapjuh-Log.txt") FileSetTime($RightDir & "\Aapjuh Prog\Aapjuh-Log.txt", "20031101" ,0) FileSetTime($RightDir & "\Aapjuh Prog\Aapjuh-Log.txt", "20031101" ,1) FileSetTime($RightDir & "\Aapjuh Prog\Aapjuh-Log.txt", "20031101" ,2) EndIf _Aapjuh_CheckDate() ;-----------------------------------------------------------------------------------it calls the above function here again ElseIf FileExists($RightDir & "\Aapjuh Prog\Aapjuh-Log.txt") Then Sleep(100) Else _Aapjuh_ErrorMsgBox() _Aapjuh_ErrorLogMakingLog() EndIf EndFunc
i dont know if the error happens before or after it goes through _Aapjuh_MakeLog().
How can i solve this? and wuts with the UAC being involved somehow..
thanks in advance,
Aapjuh