Sign in to follow this  
Followers 0
Juggernaut

Search for text on screen?

3 posts in this topic

Is this at all possible? If so, what should I look under? Thanks! :bye:

Share this post


Link to post
Share on other sites



Well, your query is kinda vague and general, but if it's as simple as checking that a known window is currently displaying a known string, something as simple as the following might suffice:

$someWindowTitle = "Pictures of ferrets dot ee ex ee"
$someWindowText = "This one is totally wearing a party hat"
$isThere = winactivate($someWindowTitle, $someWindowText)
If $isThere Then
;do some stuff
Else
;do some other stuff
EndIf
;more stuff
Exit

Now, if you're not checking that it's "there" per se, but rather that it is going to be there within the next ten seconds, you might wanna go with something along the lines of:

$someTimeoutInSeconds = 10
$isThere = winwaitactive($someWindowTitle, $someWindowText, $someTimeoutInSeconds)
If $isThere Then
;do some stuff
Else
;do some other stuff
EndIf
;more stuff
Exit

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