Jump to content
Sign in to follow this  
RRaebiger

Get the last opened Window if there are several with same name

Recommended Posts

RRaebiger

Hello,

i'am new with AutoIt and need some help.

I have an application which opens a special window everytime with the same title. If there are allready some windows opened, how can i find out which of these same titeled windows has been opened at last?

I tried it with handles, but still i am without a solution.

Has anybody an idea?

Regards

Rainer Raebiger

Share this post


Link to post
Share on other sites
SlimJim

You could try using the text parameter, if there is a piece of text in the window which identifies the window you are looking for.

Share this post


Link to post
Share on other sites
SmOke_N

You could try using the text parameter, if there is a piece of text in the window which identifies the window you are looking for.

If the window has the same title as the previous window, then that's not going to work. What application is this?? Maybe we can try to see if we can come up with a solution using it.


Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Share this post


Link to post
Share on other sites
MHz

If the window has the same title as the previous window, then that's not going to work.

I think differently.

Select
    Case WinActive('Same Title', 'some text')
        ; do something
    Case WinActive('Same Title', 'different text')
        ; do something
EndSelect

Share this post


Link to post
Share on other sites
SmOke_N

I think differently.

Select
    Case WinActive('Same Title', 'some text')
    ; do something
    Case WinActive('Same Title', 'different text')
    ; do something
EndSelect
True enough.. a bit brain dead today, if that doesn't work, Helge and myself came up with a couple of scenerios yesterday... http://www.autoitscript.com/forum/index.php?showtopic=20747

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Share this post


Link to post
Share on other sites
Valik

I think all the window functions will match the last active window in the event more than one window meets the search criteria.

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.