← Back to team overview

sikuli-driver team mailing list archive

Re: [Question #143874]: keyDown(Key.SHIFT) not working on Win?

 

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

    Status: Open => Answered

RaiMan proposed the following answer:
The selection in the Notepad window is lost, when Notepad loses focus.

If you put a wait(3) after your sequence, you can see the select happen
;-)

This worked for me on Win7 with X 1.0rc1:

n = App("notepad")
n.focus(); wait(1)
type("asdf")
keyDown(Key.SHIFT)
type(Key.LEFT)
type(Key.LEFT)
type(Key.LEFT)
keyUp(Key.SHIFT)
type("c", KEY_CTRL)
print Env.getClipboard()

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