Jump to content

Sending commands to IE


Recommended Posts

I have 2 scripts that gets the current IE window and directs it a webpage. The problem that I am having is that often times there is more than one tab open and my script won't work properly when the focus is on the second tab. To try and fix this I am trying to send IE the command to change to the first tab which is "Control + 1" and then navigate to the desired link. However, I cannot seem to get my script to change to the first tab before navigating to the link.

This is my first script

#include <IE.au3>
#AutoIt3Wrapper_run_debug_mode=Y


Func IE_Navigate_Map()
    Local $title = WinGetTitle ("[CLASS:IEFrame]")
    Local $trimTitle = StringTrimRight($title, 20)
    Local $oIE = _IEAttach($trimTitle)
    _IENavigate($oIE, "https://www.google.com/maps/d/viewer?mid=1itdKt_5_qG_pIxM5N49qNK55rkM&ll=43.84185846009771%2C-91.24873084573369&z=9")
EndFunc

Send("^1")
IE_Navigate_Map()

This is my second script

#include <IE.au3>
#AutoIt3Wrapper_run_debug_mode=Y


Func IE_Navigate_Web()
    Local $title = WinGetTitle ("[CLASS:IEFrame]")
    Local $trimTitle = StringTrimRight($title, 20)
    Local $oIE = _IEAttach($trimTitle)
    _IENavigate($oIE, "http://www.explorelacrosse.com/")
EndFunc

Send("^1")
IE_Navigate_Web()

 

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...