mm.py 文件源码

python
阅读 28 收藏 0 点赞 0 评论 0

项目:PYSHA 作者: shafaypro 项目源码 文件源码
def on_command_move(self, mouse_command=None):
        try:
            if mouse_command is not None:
                mouse_command = mouse_command.strip()  # remove the extra white spaces
                mouse_command = mouse_command.lower()  # Converts into lower Strings
                if mouse_command == "left":
                    self.move_left()  # move left function is called
                elif mouse_command == "right":
                    self.move_right()  # move right function is called
                elif mouse_command == "up":
                    self.move_up()  # move up function is called
                elif mouse_command == "down":
                    self.move_down()  # Move down function called
                elif mouse_command == "click":
                    self.on_click_screen()  # Clicks the specified location in the Screen
                else:
                    print("Invalid Command Mate!")
                    return  # Returns to the Place where the function was called
        except KeyboardInterrupt as Ex:
            print("Interrupted by the Keyboard keys :", Ex)
        except Exception as Ex:
            print("The following Error Occurred", Ex)  # this is the Printing of the exception
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号