sikuli-driver team mailing list archive
-
sikuli-driver team
-
Mailing list archive
-
Message #23109
Re: [Question #241980]: Set Env Clipboard
Question #241980 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/241980
RaiMan proposed the following answer:
I always understood, what you want to do, but it seems, that I could not
explain the solution.
did you ever try this:
text = 'asdf/fasdf/asd/a/gasdf/faasdfwer/werwerwerw/werwerwrgasdf/asdfasdfa/fasdfasdfasdfasfasdf/asdfasdfasd/'
paste(("1389487321663.png", text)
or
text = 'asdf/fasdf/asd/a/gasdf/faasdfwer/werwerwerw/werwerwrgasdf/asdfasdfa/fasdfasdfasdfasfasdf/asdfasdfasd/'
click("1389487321663.png")
#wait(0.5) #might be needed
paste(text)
might be, that a short wait() is needed between the click and the paste,
to give the GUI some time.
BTW: I just found out, that version 1.0.1 now has a Env.setClipboard(text) function (sorry that I did not remember my own doing ;-)
The use of class Env is deprecated with version 1.0.1+.
now it is:
App.getClipboard()
App.setClipboard()
One more thing:
paste(text) internally simply is
App.setClipboard(text)
type("v", modifier)
where modifier is either Key.CMD or Key.CTRL depending on the system we
are running on.
--
You received this question notification because you are a member of
Sikuli Drivers, which is an answer contact for Sikuli.