← Back to team overview

sikuli-driver team mailing list archive

Re: [Question #163944]: evaluating the contents of the Clipboard

 

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

    Status: Open => Answered

RaiMan proposed the following answer:
--- Tip: Supposing you are using Sikuli script: if you have some experience with Python and more Excel handling is needed: 
have a look at xlrd ( http://pypi.python.org/pypi/xlrd )

--- Your question:
type("c",KEY_CTRL)
only simulates a ctrl-c keyboard action. If some text (and only text is supported currently by Sikuli) is currently selected, it will be on the clipboard afterwards and can be retrieved using x = Env.getClipboard().
In your case, you have to take care, that inside the cell all content is selected, when firing the ctrl-c. Otherwise, the clipboard will contain some non-text content, that is ignored by Env.getClipboard().

Not sure (currently on Mac ;-), but I think doubleclicking a cell will
somehow select the content.

One more thing: Env.getClipboard() gets useless, when used after a
second or third paste() (it's a bug :-(

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