Sometimes developers, users and scripters are so lazy to process form submission on the Internet, they have to write some scripts to help them automate the submission of a form.
This is where TechieDan will roughly teach you how to abuse this script sending to form. Utilizing Internet Explorer (IE) and vbscript, I will automate sending a login to GMail.
Create an empty text document as name it anything you like ex: gmail-automate.vbs
Let’s begin with the vbscript opening an Internet Explorer application to run it.
Set IE = CreateObject("InternetExplorer.Application")
Now we have to designate the URL the Internet Explorer needed to run.
IE.Navigate "http://www.gmail.com" IE.Visible = True
Surprise? It opens up an Internet Explorer at the page we are looking at. Now for each form, it is understood that all of them have different property names and that is where we have to first do a manual investigation of the form properties.
Added a timer so that the form would be able to take some time to load before it submits. Also if you wanted to, you can use IE.Busy to check if it finished loading
Wscript.Sleep 6000
Finally it is time to put in your details and this will work.
IE.Document.All.Item("Email").Value = "youremail" IE.Document.All.Item("Passwd").Value = "yourpassword" IE.Document.All.Item("signIn").Click
Thoughts
Using the above method works. Of course by understanding this concept, one could actually write a script which might subsequently try to login as many times by doing a loop function (after submit – reload form – and so on). We are getting lazier by the moment but sometimes it is the convenience of just a click and we are in.
For those still clueless, below is the final script.
Set IE = CreateObject("InternetExplorer.Application") IE.Navigate "http://www.gmail.com" IE.Visible = True Wscript.Sleep 6000 IE.Document.All.Item("Email").Value = "youremail" IE.Document.All.Item("Passwd").Value = "yourpassword" IE.Document.All.Item("signIn").Click
Do note that you should use this wisely.
Hi can you help me with auto-submit script? I need one that can enter multiple email addresses into a web-form .