title: VBScript to Launch a website login
body: <p>I found this script online, I edited most of it. </p>
  
  <p>It is able to enter username, and password on its down but it is not able to click login. </p>
  
  <p>please help me fix
  <strong>Here is login forum.</strong></p>
  
  <pre><code>http://desistream.tv/en/index.shtml
  </code></pre>
  
  <p><strong>Here is Script</strong> currently it is in IE but I will need to change it open in Google Chrome.</p>
  
  <pre><code>WScript.Quit Main
  
  Function Main
    Set IE = WScript.CreateObject("InternetExplorer.Application", "IE_")
    IE.Visible = True
    IE.Navigate "http://desistream.tv/en/index.shtml"
    Wait IE
    With IE.Document
      .getElementByID("login_username").value = "myusername"
      .getElementByID("login_password").value = "mypassword"
      .getElementByID("form").submit
    End With
  End Function
  
  Sub Wait(IE)
    Do
      WScript.Sleep 500
    Loop While IE.ReadyState &lt; 4 And IE.Busy 
    Do
      WScript.Sleep 500
    Loop While IE.ReadyState &lt; 4 And IE.Busy 
  End Sub
  
  Sub IE_OnQuit
    On Error Resume Next
    WScript.StdErr.WriteLine "IE closed before script finished."
    WScript.Quit
  End Sub
  </code></pre>