killroy Posted July 6, 2005 Share Posted July 6, 2005 Greetings everyone, Quick one, has AutoIT got the ability to run as a background process which would wait for a timeout (similar to that of a screensaver). Let me try and give you an example, I require a background process which will run an application after a specified time has passed if there is no mouse movement. I need to run a Powerpoint presentation as a screensaver on my network and after spending the morning and afternoon searching through websites for the answer it suddenly dawned on me to try the brilliant AutoIT! I look forward to your reponses with great anticipation. Thank you. Byron Link to comment Share on other sites More sharing options...
w0uter Posted July 6, 2005 Share Posted July 6, 2005 you can loop until MouseGetPos() returns the same result. My UDF's:;mem stuff_Mem;ftp stuff_FTP ( OLD );inet stuff_INetGetSource ( OLD )_INetGetImage _INetBrowse ( Collection )_EncodeUrl_NetStat_Google;random stuff_iPixelSearch_DiceRoll Link to comment Share on other sites More sharing options...
killroy Posted July 6, 2005 Author Share Posted July 6, 2005 you can loop until MouseGetPos() returns the same result.<{POST_SNAPBACK}>Hey, sorry to be a lazy boy but would you mind giving me a little tiny example. I will take what you give me and go from there, I hope Link to comment Share on other sites More sharing options...
jdickens Posted July 6, 2005 Share Posted July 6, 2005 $TimeOut_ms = 5 * 1000 * 60 ; 5 minutes Global $CurMsPos $TRUE = 1 Func TimeOutAction() While 1 If $CurMsPos <> MouseGetPos() Then Return $TRUE EndIf ;Do TimeOut behavior Sleep(100) ;If TimeOut behavior does not provide necessary delay WEnd EndFunc ;==>TimeOutAction While 1 $CurMsPos = MouseGetPos() Sleep($TimeOut_ms) If $CurMsPos = MouseGetPos() Then If TimeOutAction() Then EndIf EndIf WEnd not tested J If I am too verbose, just say so. You don't need to run on and on. 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