Search This Blog

Tuesday, November 23, 2010

Functionlity: Code for Disable or Enable Tabbed Browsing in IE8Function

Function EnableOrDisable_TabbedBrowsing(strEnableDisable)
Select Case strEnableDisable

Case "Disable"

hwnd2=Browser("name:=Sign On").GetROProperty("hwnd")

Dialog("hwnd:="&hwnd2).Type micAltDwn + "t" + micAltUp

Dialog("hwnd:="&hwnd2).Type micUp

Dialog("hwnd:="&hwnd2).Type

Wait(5)

Dialog("text:=Internet Options").Type micAltDwn + "t" + micAltUp

Dialog("text:=Tabbed Browsing Settings").WinCheckBox("text:=&Enable Tabbed Browsing \(requires restarting Internet Explorer\)").Set "OFF"

Dialog("text:=Tabbed Browsing Settings").WinButton("text:=OK").Click

Dialog("text:=Internet Options").WinButton("text:=OK").Click

Case "Enable"

hwnd2=Browser("name:=Sign On").GetROProperty("hwnd")

Dialog("hwnd:="&hwnd2).Type micAltDwn + "t" + micAltUp

Dialog("hwnd:="&hwnd2).Type micUp

Dialog("hwnd:="&hwnd2).Type mic Return

Wait(5)

Dialog("text:=Internet Options").Type micAltDwn + "t" + micAltUp

Dialog("text:=Tabbed Browsing Settings").WinCheckBox("text:=&Enable Tabbed Browsing \(requires restarting Internet Explorer\)").Set "ON"

Dialog("text:=Tabbed Browsing Settings").WinButton("text:=OK").Click Dialog("text:=Internet Options").WinButton("text:=OK").Click
End Select

End Function

No comments:

Post a Comment