Sign in to follow this  
Followers 0
RRaebiger

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

6 posts in this topic

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



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

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.


[center]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.[/center]

Share this post


Link to post
Share on other sites

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

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

[center]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.[/center]

Share this post


Link to post
Share on other sites

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  
Followers 0