sikuli-driver team mailing list archive
-
sikuli-driver team
-
Mailing list archive
-
Message #17290
Re: [Question #225874]: TypeError: argument 1 must be string or read-only character buffer, not int
Question #225874 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/225874
Status: Open => Answered
RaiMan proposed the following answer:
you seem to expect, that
a =(type("v",KEY_CTRL))
returns the content of the clipboard.
But that is not the case: type() simply simulates key presses and returns 0 or 1 (print a should have told you), which in turn leads to the error at
f.write(a)
which needs a string value (no auto-conversion like with print)
If I guessed your intention right:
try:
dragDrop("Pd-1.png", "al-1.png")
except:
dragDrop("1365085975403.png","line.png")
type("c",KEY_CTRL)
f = open('msn.txt' ,'r+')
a =Env.getClipboard()
print a
f.write(a)
ler = f.read()
f.close()
print ler
--
You received this question notification because you are a member of
Sikuli Drivers, which is an answer contact for Sikuli.