Sikuli questions

Asked by Sikulipro

How to read single word from the line , we can read entire line now , please tell me how to read single word and paste that word in the application field/textfield.

* A text file- Notepad,ms-word etc.
.txt file

Question information

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

Hello.

Can you be a little more explicit ?
Read a word from what ? A file ? The OCR ?

To paste a word you can use :
click(<img of your textfield>)
paste("yourword")

Regards.

Revision history for this message
Best obiwan-92 (obiwan-92) said :
#2

OK, try this.
line = "I try to do the right thing" # the line you read in notepad
for word in line.split(' '):
    print "word : ", word

Revision history for this message
Sikulipro (saindane-harshal) said :
#3

Thanks obiwan-92, that solved my question.

Revision history for this message
Sikulipro (saindane-harshal) said :
#4

Thanks a lot.