← Back to team overview

sikuli-driver team mailing list archive

Re: [Question #177234]: Backspace x 10

 

Question #177234 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/177234

    Status: Open => Answered

RaiMan proposed the following answer:
Sorry for mistyping in the for statements :-(

Now I tested the stuff and found, that only --1. works as expected (with
--2. the backspaces seem to come to fast after each other)

so again:

1 of some solutions ;-)

--1.
def myMulti(n, k = Key.BACKSPACE):
     for i in range(n):
         type(k)

# usage:
myMulti(30)) # 30 backspaces
myMulti(10, Key.DOWN) # 10 down's

Only to be sure:
the focus has to be on the text field and the cursor posited correctly.

-- 
You received this question notification because you are a member of
Sikuli Drivers, which is an answer contact for Sikuli.