1. win32api.EnumDisplayMonitors ->
[
(<PyHANDLE at 55973320 (131223)>,
<PyHANDLE at 55973416 (0)>, (0, 0, 1600, 900)),
(<PyHANDLE at 55973584 (131073)>,
<PyHANDLE at 55973368 (0)>, (1600, 0, 3520, 1080)),
(<PyHANDLE at 55973560 (327743)>,
<PyHANDLE at 55973752 (0)>, (3520, 0, 5440, 1080))
]
如图所示:
For example:
Remote desktop Login:
import win32api,win32con import SendKeys from win32api import GetKeyState from win32con import VK_CAPITAL clkey=GetKeyState(VK_CAPITAL) print "Current key state: "+str(clkey) +" 0 ->normal 1->open" if clkey==0: SendKeys.SendKeys("{CAPSLOCK}") else: pass print "after: " +str(GetKeyState(VK_CAPITAL)) send1 = "passwd" win32api.SetCursorPos((2640, 446)) win32api.mouse_event(win32con.MOUSEEVENTF_LEFTDOWN, 2640,446, 0, 0) win32api.mouse_event(win32con.MOUSEEVENTF_LEFTUP, 2640, 446, 0, 0) SendKeys.SendKeys(send1) SendKeys.SendKeys("{ENTER}")