import win32con
import win32com
import win32clipboard
import win32gui
from ctypes.wintypes import LONG, HWND, UINT, WPARAM, LPARAM, FILETIME
point = win32gui.GetCursorPos()
hwnd = win32gui.WindowFromPoint(point)
# How to Send a file to HWND?
win32gui.SendMessage(hwnd, win32con.WM_DROPFILES , WPARAM(FILETIME("d:\\test.jpg")), 0)
如何用Python发送一个文件到接受文件拖拽的窗口?
认证高级PHP讲师