Sign in to follow this  
Followers 0
PeteP

Activate a window which doesn't contain certain text

5 posts in this topic

Hello,

How can I activate a window which contain certain text in title, but doesn't contain some other known text... For example if title contain abc but doesn't contain dfg??

Thanks

-Pete

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

when there is a chance on multiple windows containing "abc" you could retrieve all titles With WinList() and do your own testing on the available windows and activating the one you need.

Something like :

$var = WinList()
;
For $i = 1 to $var[0][0]
    If StringInStr($var[$i][0],"Abc") And Not StringInStr($var[$i][0],"dfg") Then
        WinActivate($var[$i][1],"")
    EndIf
Next
Edited by Jos

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

#4 ·  Posted (edited)

Thanks a lot guys!!!!!!!!

-Pete

Edited by PeteP

Share this post


Link to post
Share on other sites

#5 ·  Posted (edited)

Thanks a lot guys!!!!!!!!

-Pee

lmao you missed a letter me thinks :) :) :party:

Edit: sorry, i couldn't help it. What can I say? I'm immature. :lmao:

Edited by Paulie

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