Jump to content
Sign in to follow this  
Lakes

Sending keystokes to IE...

Recommended Posts

Lakes

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.

Share this post


Link to post
Share on other sites
furrycow

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

Share this post


Link to post
Share on other sites
Lakes

Many Thanks! :(


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

Share this post


Link to post
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
Sign in to follow this  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.