Board index » Visual Studio » Internet Explorer 6 vs. 7

Internet Explorer 6 vs. 7

Visual Studio12
I am running into a problem with IE7 and the scripts that used to work

pre-IE7. For example, this program does not work...



Private Sub SetupIE



Dim strTitle 'Title of IE window

Dim intCount 'Counter used during AppActivate



strTitle =3D "Testing IE7 vs IE6"



'Create reference to objIntExplorer

'This will be used for the user messages. Also set IE display

attributes

Set objIntExplorer =3D

Wscript.CreateObject("InternetExplorer.Application")

With objIntExplorer

.Navigate "about:blank"

.ToolBar =3D 0

.Menubar =3D 0

.StatusBar =3D 0

.Width =3D 400

.Height =3D 250

.Left =3D 100

.Top =3D 100

End With



'Set some formating

With objIntExplorer.Document

.WriteLn ("<!doctype html public>")

.WriteLn ("<head>")

.WriteLn ("<title>" & strTitle & "</title>")

.WriteLn ("<style type=3D""text/css"">")

.WriteLn ("body {text-align: left; font-family: arial;

font-size: 10pt}")

.WriteLn ("</style>")

.WriteLn ("</head>")

End With



'Wait for IE to finish

Do While (objIntExplorer.Busy)

Wscript.Sleep 200

Loop



'Show IE

objIntExplorer.Visible =3D 1



'Make IE the active window

For intCount =3D 1 To 100

If objWshShell.AppActivate(strTitle) Then Exit For

WScript.Sleep 50

Next

objIntExplorer.Document.WriteLn("<hr style=3D""width:100%""></hr>")



End Sub



'=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=

=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=

=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D

' S t a r t o f m a i n

'=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=

=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=

=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D



Set objWshShell =3D CreateObject( "WScript.Shell" )



'Setup IE for use as a status message window

Call SetupIE



this works with IE6, but not with 7. Any ideas?



jos=E9


-
 

Re:Internet Explorer 6 vs. 7

I had to uninstall 7 and go back to 6. Such are betas.



-