← Back to team overview

sikuli-driver team mailing list archive

[Bug 769837] Re: [1.0.1] Env.getClipboard() seems to work only once and does not access real clipboard anymore after using paste()

 

Hi,
I'm experiencing the same behaviour with the paste function. As I needed this function (and I still do), I wrote a custom paste function months ago using Java classes. It perfectly works for me, but I must admit that I don't really know why, I found this solution empirically ... If you find why, maybe you'll find the solution.

PS : I tested the code above given by Philippe Trounev but unfortunately
it didn't work for me. (Sikuli 1.0.1 x64 Linux/JDK 7u3).

** Attachment added: "custom_paste_function.py"
   https://bugs.launchpad.net/sikuli/+bug/769837/+attachment/3913198/+files/custom_paste_function.py

-- 
You received this bug notification because you are a member of Sikuli
Drivers, which is subscribed to Sikuli.
https://bugs.launchpad.net/bugs/769837

Title:
  [1.0.1] Env.getClipboard() seems to work only once and does not access
  real clipboard anymore after using paste()

Status in Sikuli:
  In Progress

Bug description:
  --1. I use Interactive Sikuli Jython Session to do all this, if I
  relaunch it and check Env.getClipboard it has the new content. So it
  seems like Env.getClipboard only gets updated at the start.

  --2. After using paste() the first time, Env.getClipboard() only
  returns the last pasted content, no matter what the "real" clipboard
  may contain.

  -------------------------------------------------------------------------

  I'm trying to get a few lines of text into variables in a for loop using Env.getClipboard() but it only works on the first loop.
  On the second loopiteration  Env.getClipboard seems to always return the last value of the first one.

  I've checked the clipboard and the values are being correctly copied.

  Any ideia what might be causing this? runing v. X-1.0rc2 Mac OS 10.6.7

  Thanks in advance.

To manage notifications about this bug go to:
https://bugs.launchpad.net/sikuli/+bug/769837/+subscriptions


References