Jump to content

Internet Explorer 7


Recommended Posts

Im doing some error test at the beginning of my script and I want to check if the user have Internet explorer v7 ( the latest one). Wich IE command should I use? I tried _IE_VersionInfo but it doesnt say anything about the v7.

Link to comment
Share on other sites

Im doing some error test at the beginning of my script and I want to check if the user have Internet explorer v7 ( the latest one). Wich IE command should I use? I tried _IE_VersionInfo but it doesnt say anything about the v7.

I think i remember hearing that the object model was completely different for 7, the best way to check would probably be through the registry.

***edit***

also, nice avatar

Edited by cameronsdad
Link to comment
Share on other sites

If you use IE.au3 and have a browser object reference $oIE

$oIE.document.parentwindow.top.navigator.appVersion ()

Although it may not return what you expect... IE7 on my system gives:

4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 1.0.3705; .NET CLR 1.1.4322; .NET CLR 2.0.50727; Tablet PC 1.7; .NET CLR 3.0.04506.30)

Dale

Free Internet Tools: DebugBar, AutoIt IE Builder, HTTP UDF, MODIV2, IE Developer Toolbar, IEDocMon, Fiddler, HTML Validator, WGet, curl

MSDN docs: InternetExplorer Object, Document Object, Overviews and Tutorials, DHTML Objects, DHTML Events, WinHttpRequest, XmlHttpRequest, Cross-Frame Scripting, Office object model

Automate input type=file (Related)

Alternative to _IECreateEmbedded? better: _IECreatePseudoEmbedded  Better Better?

IE.au3 issues with Vista - Workarounds

SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y

Doesn't work needs to be ripped out of the troubleshooting lexicon. It means that what you tried did not produce the results you expected. It begs the questions 1) what did you try?, 2) what did you expect? and 3) what happened instead?

Reproducer: a small (the smallest?) piece of stand-alone code that demonstrates your trouble

Link to comment
Share on other sites

If this test give the same result for every computer using IE v7 then it might work. If not, I will have to find another solution.

I use this format :

If ;IE explorer V7
    Else
        MsgBox(0,"Error","IE Version")
        Sleep(50)
        If FileExists(@SCRIPTDIR & "\Config.ini") Then
            IniWrite(@SCRIPTDIR & "\Config.ini", "Settings", "First", "0")
            IniWrite(@SCRIPTDIR & "\Config.ini", "Settings", "Second", "0")
            IniWrite(@SCRIPTDIR & "\Config.ini", "Settings", "Third", "0")
            IniWrite(@SCRIPTDIR & "\Config.ini", "Settings", "Fourth", "")
            IniWrite(@SCRIPTDIR & "\Config.ini", "Settings", "Fifth", "0")
        EndIf
        Exit
    EndIf

There's no reg key that store the IE version?

Edited by J0ker
Link to comment
Share on other sites

If this test give the same result for every computer using IE v7 then it might work. If not, I will have to find another solution.

I use this format :

If ;IE explorer V7
    Else
        MsgBox(0,"Error","IE Version")
        Sleep(50)
        If FileExists(@SCRIPTDIR & "\Config.ini") Then
            IniWrite(@SCRIPTDIR & "\Config.ini", "Settings", "First", "0")
            IniWrite(@SCRIPTDIR & "\Config.ini", "Settings", "Second", "0")
            IniWrite(@SCRIPTDIR & "\Config.ini", "Settings", "Third", "0")
            IniWrite(@SCRIPTDIR & "\Config.ini", "Settings", "Fourth", "")
            IniWrite(@SCRIPTDIR & "\Config.ini", "Settings", "Fifth", "0")
        EndIf
        Exit
    EndIf

There's no reg key that store the IE version?

i'm just about positive that there is, but i don't have 7 here at work to locate it for you. you should be able to find it on MSDN, or with a look through your registry. someone mentioned using an app earlier to monitor the registry in the thread about ms office file locations, the same program may help you if you're not comfortable treading around in there manually
Link to comment
Share on other sites

Thanks !

;IE V7
        
        $IE = RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Internet Explorer\Version Vector","IE")
        
        If $IE = "7.0000" Then
        Else    
        MsgBox(0,"Internet Version Error ","Internet Explorer v.7 is required")
            Sleep(50)
        If FileExists(@SCRIPTDIR & "\Config.ini") Then
            IniWrite(@SCRIPTDIR & "\Config.ini", "Settings", "First", "0")
            IniWrite(@SCRIPTDIR & "\Config.ini", "Settings", "Second", "0")
            IniWrite(@SCRIPTDIR & "\Config.ini", "Settings", "Third", "0")
            IniWrite(@SCRIPTDIR & "\Config.ini", "Settings", "Fourth", "")
            IniWrite(@SCRIPTDIR & "\Config.ini", "Settings", "Fifth", "0")
        EndIf
        Exit
    EndIf

Quick question: How did you find those registry path?

Edited by J0ker
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...