WinBatch Tech Support Home

Database Search

If you can't find the information using the categories below, post a question over in our WinBatch Tech Support Forum.

TechHome

OLE with MSIE
plus

Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.

Log onto the Old WebBoard via OLE

 Keywords: InternetExplorer Application Submit Form  

#definesubroutine startMSIE()
   Browser = objectopen("InternetExplorer.Application")
   Browser.addressbar = @false
   Browser.statusbar = @false
   Browser.menubar = @false
   Browser.toolbar = @false
   browser.visible = @true

   url = "http://webboard.winbatch.com/wbisadll/wbpx.isa/~winware" ;Notice: this forum is going to be archived. The new forum is http://forum.winbatch.com. 

   browser.navigate(url)
   ;   wait until page loads...
   WaitForPageLoad()
   ;   setup the document object...
   browserDoc = Browser.Document
   all = browserdoc.all
   return(browser)
#endsubroutine

#DefineSubroutine WaitForPageLoad()  ; assume Browser
   While browser.busy || browser.readystate == 1
      TimeDelay(0.5)
   EndWhile
   While browser.Document.ReadyState != "complete"
      TimeDelay(0.5)
   EndWhile
   return
#EndSubroutine



;   set up what to do if the browser is closed before the script ends...
intcontrol(73, 1, 0, 0, 0)

br = startMSIE()

userIDField = all.name
pwdField    = all.pass

userIDField.value = "fakeusername"
pwdField.value = "fakepassword"

timedelay(5)

form = all.form
form.submit

:WBERRORHANDLER
intcontrol(73, 1, 0, 0, 0)

exit

Article ID:   W15656
File Created: 2013:06:19:13:03:32
Last Updated: 2013:06:19:13:03:32