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:
https://social.msdn.microsoft.com/Forums/Lync/en-US/c56ed86b-a8ec-4ca4-9e30-1df2df99bae1/shellappactivate-parameter-in-vbscript-for-ie-on-win10?forum=scripting
Code I have in place is:
Dim objShellDim 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://social.msdn.microsoft.com" 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 for WScript.Shell.AppActivate ??
And before anyone suggests AutoHotKeys, IT is not letting me install it. :(