← Back to team overview

sikuli-driver team mailing list archive

Re: [Question #264960]: How could I place a string into clipboard?

 

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

    Status: Open => Answered

RaiMan proposed the following answer:
instead of hacking around, you should have tried to ask the right question:
since App.setClipboard() expects some text (string) as parameter:
How can a number converted to a text string?

the answer, which is simply Python specific again:
countAsText = str(count)

or even
"%d" % (count)

the second version is handy for situations, where you want to put more
than one variable into the text and enhancing it with some words.

Both can be found in the Python docs and very early in any Python
tutorial.

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