Sure!
import win32clipboard as cb
cb.OpenClipboard()
cb.SetClipboardText("patate")
Nicolas Langlois wrote:
Then how come I can copy numbers that are output from my script editor
to an other app such as notepad?
Maybe the copy from the script editor is not the same as the one from
XSi (Application). Such seem to be the case because the Copy from the
script editor doesn't print out any command.
But I'm still looking for a way to copy a float into my XSI clipboard
memory for later pasting action. Anyone has any info on this?
Thanks for any help.
Nicolas Langlois
Senior Rigger / TD
Buzz Image
Marc-André Belzile wrote:
AFAIK, the Copy command only handles scene objects.
-mab
-----Original Message-----
From: owner-xsi(at)Softimage.COM [mailto:owner-xsi(at)Softimage.COM] On
Behalf Of Nicolas Langlois
Sent: April 17, 2007 9:04 AM
To: XSI(at)Softimage.COM
Subject: Application.Copy()
Hello list,
I'm having a little trouble trying to copy some data (one float
number for now) straight to the clipboard at the end of a script. I
tried converting it to a string since Application.Copy seems to work
with a string but it still doesn't work. It seems like a very simple
question but I can't seem to find the solution. Anyone has done this
before???
Here's some code (Python) to show you a little what I tried:
distance = 3.4567
Application.Copy(distance)
# try to paste it anywhere, it doesn't paste 3.4567
# convert it to a string before
distance = 3.4567
Application.Copy("%s" % distance)
# try to paste it anywhere, it still doesn't paste 3.4567
# convert it to a list of string since the doc seems to imply a list
distance = 3.4567 Application.Copy(["%s"] % distance) # try to paste
it anywhere, it still doesn't paste 3.4567
Thanks for any help,
Nicolas Langlois
Senior Rigger / TD
Buzz Image
---
Unsubscribe? Mail Majordomo(at)Softimage.COM with the following text in
body:
unsubscribe xsi
---
Unsubscribe? Mail Majordomo(at)Softimage.COM with the following text in
body:
unsubscribe xsi
---
Unsubscribe? Mail Majordomo(at)Softimage.COM with the following text in
body:
unsubscribe xsi
---
Unsubscribe? Mail Majordomo(at)Softimage.COM with the following text in body:
unsubscribe xsi