/build/static/layout/Breadcrumb_cap_w.png

AutoIt idle time execution

I was trying to run a given application using relative paths when the pc is idle this way


#include <Timers.au3>

While 1

   Sleep(10)

   $idleTimer = _Timer_GetIdleTime()

   If $idleTimer > 3000000 And Not ProcessExists("$env:localappdata\application.exe") Then

      Run("$env:localappdata\application.exe") 

   ElseIf $idleTimer < 10 Then

      ProcessClose("$env:localappdata\application.exe")

   EndIf

WEnd




But for some reason I'm not being able to make it run


Needed some help here


0 Comments   [ + ] Show comments

Answers (0)

Be the first to answer this question

 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ