http://sourceforge.net/projects/pywin32/files/pywin32/Build216/pywin32-216.1.win32-py3.2.exe/download
更多的整理資料 關於pywin32的應用
http://nullege.com/codes/search/win32con.CF_TEXT
下面是範例程式碼:
import os, sys
import win32clipboard as wc
import win32con
# Copy to Clipboard
#(Executed after each function completion)
#-------------------
def copy_to_clipboard(msg):
if sys.platform == 'win32':
wc.OpenClipboard()
wc.EmptyClipboard()
##win32con.CF_UNICODETEXT is more useful than win32con.CF_TEXT
wc.SetClipboardData(win32con.CF_UNICODETEXT, msg)
wc.CloseClipboard()
# Anchor Tags (<a href="HREF" title="TITLE">LINKTEXT</a>)
#-------------------
def anchor():
var="stayhigh"
copy_to_clipboard(var)
print ("\nanchor has been copied to your clipboard.\n")
anchor()
沒有留言:
張貼留言