Jump to content

Checking text of a window


Recommended Posts

Im trying to launch a wave file when the text, "Input this number:" appear in the window of a game, as the follow img:

Posted Image

This is my source but .. im a bit lost :

While 1
Sleep(10000)
WEnd

Func Start()
While 1
    If WinActive("gamewindow") = 0 then
        Do
            WinActivate("gamewindow") 
        Until WinActive("gamewindow")
    EndIf
    If Not @error Then


       ;source


    EndIf
WEnd
EndFunc

What can i do? thanks

Edited by McDonalds
Link to comment
Share on other sites

First I think it must be Do WinActivate("GameWindow") until WinActivate("GameWindow") == 1 ;you must check the returnvalue.

You could make pixelsearches every 5 seconds. When the police windows appears always at the same position, you could check if a pixel in this area has white colour. Then you could answer the police random messages like "stupid?" "fu im playing" ...

Link to comment
Share on other sites

First I think it must be Do WinActivate("GameWindow") until WinActivate("GameWindow") == 1 ;you must check the returnvalue.

You could make pixelsearches every 5 seconds. When the police windows appears always at the same position, you could check if a pixel in this area has white colour. Then you could answer the police random messages like "stupid?" "fu im playing" ...

yes and also check with Au3Info.exe if the text you want is visible

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...