def Mouse_LB(self,str_app,lb_dx,lb_dy,Flag='1'):
print "*********Mouse_LB function**********"
time.sleep(1)
tmp=(string.atoi(lb_dx),string.atoi(lb_dy))
hwnd = win32gui.FindWindow(None, str_app)
if hwnd < 1:
hwnd = self.find_main_window(str_app)
#win32gui.ShowWindow(hwnd, 0)
win32api.SetCursorPos(tmp)
print 'Mouse_LB tmp =',tmp
if Flag == '1':
time.sleep(1)
win32api.mouse_event(win32con.MOUSEEVENTF_LEFTDOWN,tmp[0], tmp[1])
time.sleep(0.05)
win32api.mouse_event(win32con.MOUSEEVENTF_LEFTUP,tmp[0], tmp[1])
time.sleep(0.05)
return True
win_GUI.py 文件源码
python
阅读 26
收藏 0
点赞 0
评论 0
评论列表
文章目录