title: Closing Chrome window or better solution
body: <p>I'm new to AutoIt and have a program mostly working.</p>
  
  <p>Objective: Open a website in a browser and then close it after a given period of time (1.5 hours).</p>
  
  <p>Script:</p>
  
  <pre><code>;Open a command prompt to start chrome from.
  Run("C:\WINDOWS\system32\cmd.exe")
  WinWaitActive("C:\WINDOWS\system32\cmd.exe")
  send('"c:\Program Files\Google\Chrome\Application\chrome.exe" http://website.com' &amp; "{ENTER}")
  ;Close the dos box
  WinWaitActive("C:\WINDOWS\system32\cmd.exe")
  send('exit' &amp; "{ENTER}")
  ; 5400000 = 1.5 hours
  sleep( 5400000 );
  WinWaitActive("Listen Live - Google Chrome","")
  ;Send("{F4}{ALTUP}")
  Send("{CTRLDOWN}{SHIFTDOWN}q{SHIFTUP}{CTRLUP}")
  </code></pre>
  
  <p>The opening works just fine but the script never closes. It appears to work when the timer is very short but not when it is that long. </p>
  
  <p>The script will be executed via Windows Scheduled tasks. I've tried separating the open/close into two separate scripts but that didn't seem to work either. </p>
  
  <p>I'm open to alternative solutions that will work on Windows.</p>