标签:
1 import win32clipboard as w 2 import win32con 3 4 base_addr = 0x8e00000 5 buffer_len = 0x123 6 7 def getText(): 8 w.OpenClipboard() 9 d = w.GetClipboardData(win32con.CF_TEXT) 10 w.CloseClipboard() 11 return d 12 13 def setText(aString): 14 w.OpenClipboard() 15 w.EmptyClipboard() 16 w.SetClipboardData(win32con.CF_TEXT, aString) 17 w.CloseClipboard() 18 19 while True: 20 print getText() 21 raw_input(‘‘) 22 23 buffer_index = int(raw_input(‘buffer_index:(0-15):‘)) 24 setText((‘%x‘%(base_addr + buffer_index * buffer_len)).upper())
前提是要安装pyw32
标签:
原文地址:http://www.cnblogs.com/ren-yu/p/5838262.html