Jump to content
Sign in to follow this  
anyquestion

WinActive with instance

Recommended Posts

anyquestion

Hi

In an Internet Explorer 8 browser, I have 3 instances of the same Google URL http://www.google.es/

I need to know if instance 2 is the active one, so I use WinActive as described in AutoIt Help, but this is not working (always returns 0)

WinActive("[TITLE:Google; INSTANCE:2]", "")

Have you experienced the same problem?

Regards,

Remarks:

I have this script to avoid interferences with other windows

-------------------------------------------------------

HotKeySet("!{F1}", "Rutina1") ;Alt+F1

;open 3 instances of http://www.google.es/

;select instance 2

;and key Alt+F1

While 1

Sleep(1000)

WEnd

Func Rutina1()

$result= WinActive("[TITLE:Google; INSTANCE:2]", "")

msgbox(0,"Active",$result)

EndFunc

-------------------------------------------------------

Share this post


Link to post
Share on other sites
kaotkbliss

isn't this pretty much the same as

In both you want to interact with the 2nd instance of google...


010101000110100001101001011100110010000001101001011100110010000

001101101011110010010000001110011011010010110011100100001

My Android cat and mouse game
https://play.google.com/store/apps/details?id=com.KaosVisions.WhiskersNSqueek

We're gonna need another Timmy!

Share this post


Link to post
Share on other sites
anyquestion

isn't this pretty much the same as

In both you want to interact with the 2nd instance of google...

Yep, but I think this is more clear in this example

Any clue?

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.