📜  剪贴板 python 代码示例

📅  最后修改于: 2022-03-11 14:46:05.125000             🧑  作者: Mango

代码示例4
import clr
import System
from System.Threading import Thread, ThreadStart
clr.AddReference("System.Windows.Forms")

def SetText(text):
    def thread_proc():
        System.Windows.Forms.Clipboard.SetText(text)
    t = Thread(ThreadStart(thread_proc))
    t.ApartmentState = System.Threading.ApartmentState.STA
    t.Start()
SetText("Hello word")