← Back to team overview

sikuli-driver team mailing list archive

Re: [Question #192860]: Copy empty field, Env.getClipboard() not returning correctly

 

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

    Status: Open => Answered

RaiMan proposed the following answer:
It seems, that the normal GUI behavior with ctrl-c is, that an empty
selection does not change the clipboard content, so it still contains
the last content.

This is reflected by Env.getClipboard(): it returns the last content, if
the clipboard content was not changed after copying an empty selection.

Since Sikuli currently has no feature to set/reset the clipboard to a
defined content, you might find out, that an entry field still contains
the last content (if this is logically possible with your app), by
comparing current and last content.

If this is critical for you, you might implement your own clipboard
handling using the respective Java classes in your Sikuli script.

Feel free, to post a request bug.

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