Sign in to follow this  
Followers 0
remote

Expecting multiple window titles

2 posts in this topic

I've been using AutoIT3 for only a day now but I am facing a problem where I need to be able to handle different windows title.

I'm using WinWaitActive(title) to apply actions once the window I'm expecting becomes active but in certain circumstances it is possible that a window with another name comes up instead, in which case my script hangs because it's waiting for another window.

How do you handle different window titles possibilities?

Share this post


Link to post
Share on other sites



I've been using AutoIT3 for only a day now but I am facing a problem where I need to be able to handle different windows title.

I'm using WinWaitActive(title) to apply actions once the window I'm expecting becomes active but in certain circumstances it is possible that a window with another name comes up instead, in which case my script hangs because it's waiting for another window.

How do you handle different window titles possibilities?

Something like:

While 1
    If WinActive("title1","Subtext1") then 
        
    ElseIf WinActive("title2","Subtext2") then 
        
    EndIf
    Sleep(10)
WEnd

Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

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