sikuli-driver team mailing list archive
-
sikuli-driver team
-
Mailing list archive
-
Message #02805
Re: [Question #157211]: Simple explanation of how to copy text include code please
Question #157211 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/157211
Status: Open => Answered
RaiMan proposed the following answer:
The approach is, to simulate a copy & paste:
#focus on source window
App("some-identifying-text-from-source-notepad-window").focus()
wait(1)
type('a', KEY_CTRL)
type('c', KEY_CTRL)
# now we have it on the clipboard
# switch to other notepad window
App("some-identifying-text-from-target-notepad-window").focus()
wait(1)
type('v', KEY_CTRL)
wait(1)
# inserts clipboard content at cursor
with these actions, that are not fully under control of Sikuli, you have
to insert sufficient waiting times (therefor the wait()'s). It might run
without them - just find out.
--
You received this question notification because you are a member of
Sikuli Drivers, which is an answer contact for Sikuli.