title: Login in to a web-based application using the "click" on VBS
body: <p>Our company uses a browser-based program for business operations. My goal is to be able to log into this system automatically.  The problem in front of me now is to be able to do click on one button using VBSript,</p>
  
  <p>This is the code I have so far that take me to the point where I'm positioned over the button:</p>
  
  <pre><code>set WshShell = WScript.CreateObject("WScript.Shell")
  
  call WshShell.Run("http://timeclock/portal/welcome.htm", 1, false)
  
  WScript.Sleep 1000
  
  WshShell.SendKeys "{ENTER}"
  
  WScript.Sleep 2000
  
  WshShell.SendKeys "username"
  
  WScript.Sleep 1000
  
  WshShell.SendKeys "{TAB}"
  
  WScript.Sleep 1000
  
  WshShell.SendKeys "password"
  
  WshShell.SendKeys "{TAB}"
  
  WScript.Sleep 1000
  
  WshShell.SendKeys "{ENTER}"
  
  WScript.Sleep 2000
  
  WshShell.SendKeys "{TAB}"
  
  WScript.Sleep 1000
  
  WshShell.SendKeys "{TAB}"
  
  WScript.Sleep 1000
  
  WshShell.SendKeys "{TAB}"
  
  WScript.Sleep 1000
  
  WshShell.SendKeys "{TAB}"
  
  WScript.Sleep 1000
  
  WshShell.SendKeys "{TAB}"
  
  WScript.Sleep 1000
  
  WshShell.SendKeys "{TAB}"
  
  WScript.Sleep 1000
  
  WshShell.SendKeys "{TAB}"
  
  WScript.Sleep 1000
  
  WshShell.SendKeys "{ENTER}"
  
  WScript.Sleep 4000
  
  WshShell.SendKeys "EmployeeNumber"
  
  WScript.Sleep 1000
  
  WshShell.SendKeys "{TAB}"
  </code></pre>