title: Period of inactivity, run a script
body: <p>What I am looking to do is to run a .exe ONLY when a user goes inactive .  When the screen becomes active again, the script should start up again.</p>
  
  <p>Logic:</p>
  
  <pre><code>While True:
       Is the user active:          
       NO-&gt; Is the .exe running -&gt; Yes: Do nothing  No: run the Program
       YES -&gt; Close the .exe 
  </code></pre>
  
  <p>Any suggestions on how I can program this using Auto It</p>
  
  <p>Edit:</p>
  
  <p>Inactivity: no user activity (either moving the mouse or otherwise)
  Run the program:  This is a custom .exe file, that will be kept in the same folder. </p>
  
  <p>This is for a Windows box, and not a Linux machine</p>