AppActivate an opened Internet Explorer tab (VBScript)

  • Thread starter Thread starter Mark Weidner
  • Start date Start date
M

Mark Weidner

Guest
Probably the wrong forum as I am asking about VBScript in particular.

I need a VBScript to activate (bring to the front and set focus) to a previously opened Internet Explorer tab.

From the following forum post I am able to step through all the tabs on the IE browser but have not been able to actually give it focus in order to SendKeys:

shell.AppActivate parameter in VBScript for IE on Win10


Code I have in place is:

Dim objShell
Dim AllWindows
Dim win
Dim winItem
Dim wshShell

Set wshShell = WScript.CreateObject("WScript.Shell")
Set objShell = CreateObject("Shell.Application")
Set AllWindows = objShell.Windows

For Each win in AllWindows
If win.LocationUrl="https://horizonprod.burgessgroup.com/latest/BRS.aspx#/Price?ProvId=PAR" Then
Wscript.echo win.LocationUrl
Wscript.echo win.LocationName
Set winItem = AllWindows.Item

' Here is where I need to set focus and commence sending keys to the browser Window

End If
Next


What information do I need from Shell.Application do I need for WScript.Shell.AppActivate ??

And before anyone suggests AutoHotKeys, IT is not letting me install it. :(

Continue reading...
 
Back
Top