def move(self,coords, button=None):
if all(isinstance(elem, float) for elem in coords):
coords = self.to_pixel(coords)
if button == None:
_button_state = 0
elif "right" in button.lower():
_button_state = win32con.MK_RBUTTON
elif "left" in button.lower():
_button_state = win32con.MK_LBUTTON
elif "middle" in button.lower():
_button_state = win32con.MK_MBUTTON
else:
raise SyntaxError('"Button" needs to contain "left", "right" or "middle"')
l_param = win32api.MAKELONG(coords[0], coords[1])
win32api.PostMessage(self.win_handler.get_hwnd(), win32con.WM_MOUSEMOVE, _button_state, l_param)
评论列表
文章目录