How can I make sikulix type the text I've extracted from an image?

70 views Asked by At

I want to make my program take a screenshot of a region, read the text on the image (I've completed this part) and type it out with keypresses (This is the part I need help with)

So far I have this:

a=find(This is where I put my screenshot).text()
print a

This takes a screenshot, reads it for text and prints the text in the message box. How do I turn that output into keypresses?

1

There are 1 answers

0
Raimund Hocke On
switchApp("textedit") # put the target window to foreground
for x in a: 
    type(x)

RaiMan from SikuliX (you might have to learn some Python basics and look into the SikuliX docs)