Jump to content

Recommended Posts

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.


Link to post
Share on other sites

$TimeOut_ms = 5 * 1000 * 60 ; 5 minutes
Global $CurMsPos
$TRUE = 1

Func TimeOutAction()
    While 1
        If $CurMsPos <> MouseGetPos() Then
            Return $TRUE
    ;Do TimeOut behavior
        Sleep(100) ;If TimeOut behavior does not provide necessary delay
EndFunc  ;==>TimeOutAction

While 1
    $CurMsPos = MouseGetPos()
    If $CurMsPos = MouseGetPos() Then
        If TimeOutAction() Then

not tested


If I am too verbose, just say so. You don't need to run on and on.

Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    No registered users viewing this page.

  • Create New...