problems using type(): incomplete - might need wait()'s

Asked by Jonathan Antognini

i got some problem with type function.

I set type("hello world")
but write in textbox "ld" "h", etc.
when i test the only function, works very well, but into complete test fail u.u.

I am using ubuntu 10.10 32 bit.

Thanks, regards

Question information

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

Sikuli X?

look at FAQ https://answers.launchpad.net/sikuli/+faq/933

try paste() instead.

Revision history for this message
Jonathan Antognini (jantogni) said :
#2

Sikuli-X-1.0rc1-linux
latin american keyboard (i am chielan ^^), thanks for your coments.

Revision history for this message
Jonathan Antognini (jantogni) said :
#3

paste function not work neither u.u
is really freak, because sometimes write "hello world", other time "o" "ld" hld", etc, etc.
If you can help me, i will be very grateful... thanks

Revision history for this message
RaiMan (raimund-hocke) said :
#4

ok, then it might be a timing problem (the paste comes too fast):

insert a wait(2) before the paste and reduce it until it fails again - so you try what is the minimum time you have to wait.
With input fields on web-apps, my experience is about 0.3 to 0.5..

if timing is the problem and you have it solved, type may work too - but I principally recommend to use paste() for text.

There are other nice features, that keep things moving on one hand and make implicit waits on the other:
http://sikuli.org/docx/globals.html#controlling-sikuli-scripts-and-their-behavior

Revision history for this message
Jonathan Antognini (jantogni) said :
#5

thanks RaiMan, problem fixed.
I put 2 wait(2), before and after, because i weed see the text paste and send the paste text.

Thank you very much =)