Jump to content

Problem with blackScreen


Recommended Posts

Hello

I have this code :

while 1

  $bck =  waitForImage("IMG/blackscreen.png", 10)   

   If $bck Then
    MsgBox(0, '', "SUCCESS")
    ExitLoop 
    Else 
    MsgBox(0, "", "NOT FOUND")
  EndIf 

WEnd 


Func waitForImage($imageFile, $waitSecs = 5)        
    Local $timeout = $waitSecs * 1000
    Local $startTime = TimerInit()
        
    ;loop until image is found, or until wait time is exceeded
    While true 

        If _ImageSearch($imageFile, 1, 100) <> false Then
            Return true
        EndIf
        
        If $timeout > 0 And TimerDiff($startTime) >= $timeout Then
            ExitLoop
        EndIf
        sleep(50)   
    WEnd
    
    Return False
EndFunc

When i show a black screen i show success 1x but not 2x if i search again .

Why PLZ

Link to comment
Share on other sites

  • Jos locked this topic
Guest
This topic is now closed to further replies.
 Share

  • Recently Browsing   0 members

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