Click here to Skip to main content
13,255,974 members (50,579 online)
Rate this:
Please Sign up or sign in to vote.
See more:
I wrote a scripting program running by wscript.exe under DOS prompt to check whether a web page is completely loaded and then sendkeys to that page. The codes as below work fine for IE page but not mozilla page. Any suggested solution? Thanks.
Dim oShell, oWSHShell, sTitle, wndw, bMatch
sHTMLTitle = "Test Web Page"
set oShell = createobject("shell.application")
set oWSHShell = createobject("")
bMatch = false
do until bMatch = true
  for each wndw in
    if instr(lcase(typename(wndw.document)), "htmldocument") > 0 then
      sTitle = wndw.document.title
      if Instr(sTitle, sHTMLTitle)<> 0  then
        do until wndw.document.readyState = "complete"
        oWSHShell.sendkeys "123"
        bMatch = true
        exit for
      end if
    end if
Posted 13-Feb-11 23:35pm
QQ Boy101
Updated 13-Feb-11 23:45pm
JF2015 14-Feb-11 4:46am
Added code formatting.

1 solution

Rate this: bad
Please Sign up or sign in to vote.

Solution 1

AFAIK, Mozilla doesn't have an automation interface like IE does. There is no common automation interface used by all browsers. So, any code you write to work with IE, like what you have hear, will only work with IE.

What does mean? There is no scriptable way for you determine if the page is loaded or not from outside the browser.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy |
Web01 | 2.8.171114.1 | Last Updated 15 Feb 2011
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100