SkellySoul Posted March 31, 2015 Share Posted March 31, 2015 Hi, I am trying to make a project and have left this unattended and for whatever reason when I come back it stops. Is it related to may be this...and if so how do I go about fixing it please. https://www.autoitscript.com/wiki/Recursion #include <Misc.au3> #include <Date.au3> #Include <Timers.au3> #include <ScreenCapture.au3> AdlibRegister("_Pic", 5000) ; How often to capture Global $Folder_Name = @ScriptDir & "\Pics\" & @MON & "-" & @MDAY & "-" & @YEAR _Singleton(@ScriptName) While 1 Sleep(1000) WEnd Func _Pic() If _Timer_GetIdleTime() > 3000 Then ; How long pc has been inactive ;;; Else If Not FileExists($Folder_Name) Then DirCreate($Folder_Name) EndIf $Time = _NowTime() $Time_Split = StringSplit($Time , ":") $Gen = @MON & "-" & @MDAY & "-" & @YEAR & " (" & $Time_Split[1] & "-" & $Time_Split[2] & "-" & $Time_Split[3] & ")" _ScreenCapture_Capture($Folder_Name & "\" & $Gen & ".jpg") EndIf EndFunc Link to comment Share on other sites More sharing options...
Moderators JLogan3o13 Posted March 31, 2015 Moderators Share Posted March 31, 2015 "It just stops" - does that mean it hangs, or it crashes? Have you tried putting in Opt("TrayIconDebug", 1) at the top, so you can see what line it is hanging on? "Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball How to get your question answered on this forum! Link to comment Share on other sites More sharing options...
SkellySoul Posted March 31, 2015 Author Share Posted March 31, 2015 Aw thanks didn't think of trying "Opt("TrayIconDebug", 1)" and to be honest im not sure if its hanging or crashing because its gone when I come back. I'll try and run more tests and may be increase speed to see if I can get it to hang/crash Link to comment Share on other sites More sharing options...
SkellySoul Posted March 31, 2015 Author Share Posted March 31, 2015 This is the error I get "Subscript used on non-accessible variable" not sure what to do also is there a way to disable autoit errors from displaying and simply killing the process instead Link to comment Share on other sites More sharing options...
SkellySoul Posted April 1, 2015 Author Share Posted April 1, 2015 Updated to the new beta I noticed this " Fixed #2908: _ScreenCapture_Capture() failing due to out of bounds error." Link to comment Share on other sites More sharing options...
Moderators JLogan3o13 Posted April 1, 2015 Moderators Share Posted April 1, 2015 So are you saying your issue is resolved? "Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball How to get your question answered on this forum! Link to comment Share on other sites More sharing options...
SkellySoul Posted April 2, 2015 Author Share Posted April 2, 2015 So far so good Link to comment Share on other sites More sharing options...
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