Jump to content

Sending keystokes to IE...


 Share

Recommended Posts

Why the SEND command not work here?

I don`t usually use SEND, but I want to open a new tab in IE...

Must be missing something simple...

Windows Xp, SP3, IE8, Browser window already open.

$Browser = "Internet Explorer"

Opt("WinTitleMatchMode", 2)

WinActivate($Browser,"")
$size = WinGetPos("[active]")
WinMove("[active]","",300,300)
Sleep(1000)
WinMove("[active]","",$Size[0],$Size[1]); Just to make sure Browser is Active
Sleep(1000)                             

Send("{LCTRL}+T")                       ;Nothing happens here....
Beep(100,100)
Sleep(1000)
Send("^T")                              ;or here....
Beep(300,100)

2015 - Still no flying cars, instead blankets with sleeves.

Link to comment
Share on other sites

You can do it without sending keystrokes:

#include <IE.au3>

$Browser = "Internet"

Opt("WinTitleMatchMode", 2)

While WinActivate($Browser)=0
Sleep(100)
WEnd

$oIE=_IEAttach("", "instance")

While $oIE=0
Sleep(100)
$oIE=_IEAttach("", "instance");this will use the first instance of IE, put in your own value if you want a different instance
WEnd

$oIE.Navigate2('about:blank', 2048);put whatever website you want to load here-or leave it how it is for empty tab

Hope its ok!!

Edited by furrycow
Instant Lockerz Invite - www.instantlockerzinvite.co.uk
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...