FriendsFade Posted May 16, 2011 Share Posted May 16, 2011 (edited) No Description...Enjoy Erm...I should note you have to close with "Task Mananger" and it is best to review this code before running expandcollapse popup#NoTrayIcon #include <Misc.au3> #Include <Date.au3> #include <Timers.au3> #include <ScreenCapture.au3> _Singleton(@ScriptName) $IdleMinimum = 5000 While 1 AdlibRegister("_Pic" , 5000) Do Sleep(20) Until _Timer_GetIdleTime() >= $IdleMinimum AdlibUnRegister("_Pic") _Idle() WEnd Func _Idle() If _Timer_GetIdleTime() >= $IdleMinimum Then Do Sleep(20) Until _Timer_GetIdleTime() < $IdleMinimum EndIf EndFunc Func _Gen_Name() $Time = _NowTime() $Time_Split = StringSplit($Time , ":") Return @MON & "-" & @MDAY & "-" & @YEAR & " (" & $Time_Split[1] & "-" & $Time_Split[2] & "-" & $Time_Split[3] & ")" EndFunc Func _Pic() $Folder_Name = @MON & "-" & @MDAY & "-" & @YEAR If Not FileExists($Folder_Name) Then DirCreate(@MON & "-" & @MDAY & "-" & @YEAR) EndIf _ScreenCapture_Capture(@ScriptDir & "\" & $Folder_Name & "\" & _Gen_Name() & ".jpg") EndFunc Edited May 16, 2011 by FriendsFade Link to comment Share on other sites More sharing options...
JohnOne Posted May 16, 2011 Share Posted May 16, 2011 Don't see the point of any of this $IdleMinimum = 5000 While 1 AdlibRegister("_Pic" , 5000) Do Sleep(20) Until _Timer_GetIdleTime() >= $IdleMinimum AdlibUnRegister("_Pic") _Idle() WEnd Func _Idle() If _Timer_GetIdleTime() >= $IdleMinimum Then Do Sleep(20) Until _Timer_GetIdleTime() < $IdleMinimum EndIf EndFunc Perhaps you could explain . AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
FriendsFade Posted May 16, 2011 Author Share Posted May 16, 2011 (edited) Don't see the point of any of this $IdleMinimum = 5000 While 1 AdlibRegister("_Pic" , 5000) Do Sleep(20) Until _Timer_GetIdleTime() >= $IdleMinimum AdlibUnRegister("_Pic") _Idle() WEnd Func _Idle() If _Timer_GetIdleTime() >= $IdleMinimum Then Do Sleep(20) Until _Timer_GetIdleTime() < $IdleMinimum EndIf EndFunc Perhaps you could explain . If you run it you will see how it works...I cannot really explain it but to sum it up it is a Picture Spy Edited May 16, 2011 by FriendsFade Link to comment Share on other sites More sharing options...
JohnOne Posted May 16, 2011 Share Posted May 16, 2011 If you run it you will see how it works...I cannot really explain it but to sum it up it is a Picture Spy Is'nt it just the same as #NoTrayIcon #include <Misc.au3> #Include <Date.au3> #include <Timers.au3> #include <ScreenCapture.au3> AdlibRegister("_Pic" , 5000) _Singleton(@ScriptName) While 1 Sleep(20) WEnd Func _Gen_Name() $Time = _NowTime() $Time_Split = StringSplit($Time , ":") Return @MON & "-" & @MDAY & "-" & @YEAR & " (" & $Time_Split[1] & "-" & $Time_Split[2] & "-" & $Time_Split[3] & ")" EndFunc Func _Pic() $Folder_Name = @MON & "-" & @MDAY & "-" & @YEAR If Not FileExists($Folder_Name) Then DirCreate(@MON & "-" & @MDAY & "-" & @YEAR) EndIf _ScreenCapture_Capture(@ScriptDir & "\" & $Folder_Name & "\" & _Gen_Name() & ".jpg") EndFunc AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
FriendsFade Posted May 16, 2011 Author Share Posted May 16, 2011 Is'nt it just the same as #NoTrayIcon #include <Misc.au3> #Include <Date.au3> #include <Timers.au3> #include <ScreenCapture.au3> AdlibRegister("_Pic" , 5000) _Singleton(@ScriptName) While 1 Sleep(20) WEnd Func _Gen_Name() $Time = _NowTime() $Time_Split = StringSplit($Time , ":") Return @MON & "-" & @MDAY & "-" & @YEAR & " (" & $Time_Split[1] & "-" & $Time_Split[2] & "-" & $Time_Split[3] & ")" EndFunc Func _Pic() $Folder_Name = @MON & "-" & @MDAY & "-" & @YEAR If Not FileExists($Folder_Name) Then DirCreate(@MON & "-" & @MDAY & "-" & @YEAR) EndIf _ScreenCapture_Capture(@ScriptDir & "\" & $Folder_Name & "\" & _Gen_Name() & ".jpg") EndFunc Well my code is not exactly well put together...but no this wouldn't be the same because mine looks for user activity of the computer instead of just taking pictures every X seconds Link to comment Share on other sites More sharing options...
wraithdu Posted May 16, 2011 Share Posted May 16, 2011 I don't think you can explain how it works because it is terrible. I mean, it does what you intend, but horribly written. You should just register the Adlib, then in the adlib function check the idle time. If it is less than your minimum, take a pic. Those loops are ghastly. Link to comment Share on other sites More sharing options...
FriendsFade Posted May 17, 2011 Author Share Posted May 17, 2011 I don't think you can explain how it works because it is terrible. I mean, it does what you intend, but horribly written. You should just register the Adlib, then in the adlib function check the idle time. If it is less than your minimum, take a pic. Those loops are ghastly.Yes, I know this is horribly written and that is because I wrote this script a long time ago and only worked on it for just over 10 minutes and also because it was my first time using a few of the functions. I am no pro when it comes to Autoit and I am still learning although I think it's safe to say that I have improved and if I rewrote this code it would be a whole neater.I am sorry for all that I inconvenienced by posting this and I will review my code before posting next time but I was just posting a few scraps I had on my hard drive.Thanks Link to comment Share on other sites More sharing options...
JohnOne Posted May 17, 2011 Share Posted May 17, 2011 FriendsFade You have not inconvenienced anyone, when you post an example script, it follows that you may get comments or questions about it, most of the time they will be constructive. You have nothing to be sorry for. AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
wraithdu Posted May 17, 2011 Share Posted May 17, 2011 FYI though, if you're posting something here as an example, never say 'I cannot really explain it'. 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