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.

Get page contents in IE

Keywords: 	 Get page contents in IE

#DefineFunction udfIEPageLoadWait( objIE )
    ; Wait for webpage to load
    While !(objIE.readyState == 'complete' || objIE.readyState == 4 )
       Timedelay(0.1)            
    EndWhile
    While !(objIE.document.readyState == 'complete' || objIE.document.readyState == 4 )
       Timedelay(0.1)
    EndWhile
    
    Return 1 
#EndFunction

url = "http://www.winbatch.com"
objBrowser   = ObjectCreate("InternetExplorer.Application")
objBrowser.Visible = @TRUE ; Change to @FALSE to hide the process from the user
objBrowser.Navigate(url)
udfIEPageLoadWait( objBrowser )

objBrowserDoc = objBrowser.Document
BrowserText =  objBrowserDoc.Body.innerHTML 

message(url, BrowserText)
objBrowser.Quit

objBrowserDoc = 0
objBrowser = 0
exit



Article ID:   W15653
File Created: 2014:03:25:13:02:52
Last Updated: 2014:03:25:13:02:52