Python Windows controls operating series 1: analog mouse click http://www.cnblogs.com/sanquanfeng/archive/2012/01/13/2321519.html
Simulate the mouse and click the specified button in the specified window:
Import win32gui and WIN32API
Win = win32gui. findwindow (none, dialogname)
While win = 0:
Win = win32gui. findwindow (none, dialogname)
Time. Sleep (x) # Sleep X seconds
Hbtn = win32gui. find1_wex (Win, none, none, buttonname)
(Left, top, right, bottom) = win32gui. getwindowrect (hedit)
WIN32API. setcursorpos (left + (right-left)/2, top + (bottom-top)/2) # cursor position
Time. Sleep (0.5)
# Mouse clicks
WIN32API. mouse_event (win32con. mouseeventf_leftdown, 0, 0)
Time. Sleep (0.05)
WIN32API. mouse_event (win32con. mouseeventf_leftup, 0, 0)
Time. Sleep (0.05)
Always go with the choice that scares you the most, because that's the one that is going to require
The most from you!