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

Control Manager
plus
plus

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

Wait for Webpage to Load

 Keywords: cGetSBText Wait for Webpage URL Load WinWaitExist Internet Explorer Status Bar Statusbar msctls_statusbar32

url = 'http://www.google.com'
AddExtender("wwctl44i.dll")

ShellExecute(url,'', '', @NORMAL, '')
ret = WinWaitExist("~Windows Internet Explorer", 10 )
If ret == 0 Then Exit

; Wait for webpage to load
window1=DllHwnd('~Windows Internet Explorer')
window2=cWndbyseq(window1,4)
window3=cWndbyclass(window2,`TabWindowClass`)
ControlHandle=cWndbyclass(window3,`msctls_statusbar32`)
result = @TRUE
While Result == @TRUE
   ErrorMode(@OFF)
   txt = cGetSbText(ControlHandle) ;Reads statusbar text
   ErrorMode(@CANCEL)
   If StrIndex( txt, 'Done', 1, @FWDSCAN ) Then Break
   TimeDelay(0.5)
EndWhile
Pause('Notice', 'Web page is loaded')
Exit

Article ID:   W17562
Filename:   Wait for Webpage to Load.txt
File Created: 2017:07:28:12:58:28
Last Updated: 2011:05:09:14:54:12