Hi All
I have been trying to automate a login to a website using FoxPro Adviser June 2000 edition mag I have come up with the folling code.
oIE = CREATEOBJECT("InternetExplorer.Application")
oIE.Navigate("
www.bcms.gov.uk/bcms/wctd0001.htm")
oIE.Visible = .T.
WAIT "Please Wait..." WINDOW TIMEOUT 15
oIE.DOCUMENT.FORMS(1).FARMLOGIN.VALUE = "123-456-789"
oIE.DOCUMENT.FORMS(1).PRVPWD.VALUE = "1234567"
oIE.DOCUMENT.FORMS(0).Submit()
The Adviser mag had 0 in oIE.DOCUMENT.FORMS(0) but this would not work so I changed it to 1 oIE.DOCUMENT.FORMS(1)
The code works and it inserts the user id and password into the web page but I can't get it to submit the page.
Any ideas?
Also why did changing the oIE.DOCUMENT.FORMS(0) to oIE.DOCUMENT.FORMS(1) make it work?
John