Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Automate Internet Explorer Forms

Status
Not open for further replies.

jmcd0719

Programmer
Jun 13, 2001
37
US
I have written the following code to automatically login to a particular website (the site name is changed below) and it works fine.

The question I have is two fold, one is there a place where all automation methods, controls,commands for InternetExplorer.Application, etc. is listed, (Microsoft's site blows).

Secondly, if I have a form that I want to populate on the web in a certain position, but I do not know what the objectname's name is, is there a way to fill it in. The webpage after I login shows only a coldfusion program running the form without any specific object name.

Thanks in advance.

oIE = CreateObject("InternetExplorer.Application")
oIE.Visible = .T.
oIE.Navigate("oie.document.loginForm.loginName.value="login"
oIE.document.loginForm.password.Value = "password"
oIE.Document.Forms(0).Submit
 
I've asked this question myself, and no one seems to know. :eek:( I could never find any decent information about the methods available to an IE automation or ActiveX implementation.

Without knowing the exact name of the form, you should be able to access it using the Forms() collection. For example, here is my code that I used to make an automated post on a message board:
Code:
with oIE.document.forms(0)
	.password.value=m.cPassword
	.subject=m.cSubject
	.body=m.cBody
	.name=m.cName
	.submit
endwith
 
I finally found something that works.

This program ($25) will automatically fill in forms whether it's on the internet or another windows application. It has a command line structure that can run the processes and pass parameters. It also mirrors window clicks based upon relative position. The documentation is fairly good, and you can write a job in less than a couple of minutes.

It's not the perfect solution to keying in forms but it's real close.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top