OCR to wait for Text to appear for some seconds simiar to find("image",20)

Asked by Chetan

Hi
is there a method for OCR to wait for Text to appear for someting seconds simiar to find("image",20)
currently we have findText("txt")
we need something like findText("txt",20)
similar method we have in find for images

Question information

Language:
English Edit question
Status:
Solved
For:
SikuliX Edit question
Assignee:
No assignee Edit question
Solved by:
RaiMan
Solved:
Last query:
Last reply:
Revision history for this message
Best RaiMan (raimund-hocke) said :
#1

Sorry, not available.

Make yourself a def:

def waitText(text, time):
    while time > 0:
        match = findText(text)
        if match: return match
        time -= 1
    return null

something like that - not tested

anyways: I put it on the list for 2.0.6

Revision history for this message
Chetan (cshamdas) said :
#2

Thanks RaiMan, that solved my question.

Revision history for this message
Chetan (cshamdas) said :
#3

Thanks Raiman for putting it on the list