def game_reset(self):
#?? ?? ???????? ? ????
win32api.keybd_event(win32con.VK_MENU, 0, 0, 0) #alt down
time.sleep(self.interval_time)
win32api.keybd_event(win32con.VK_MENU, 0, win32con.KEYEVENTF_KEYUP, 0) #alt up
win32api.keybd_event(0x47, 0, 0, 0) # key'G' down
time.sleep(0.01)
win32api.keybd_event(0x47, 0, win32con.KEYEVENTF_KEYUP, 0) # key 'G' up
win32api.keybd_event(0x52, 0, 0, 0) # key 'R' down
time.sleep(0.01)
win32api.keybd_event(0x52, 0, win32con.KEYEVENTF_KEYUP, 0) # key 'R' up
self.game_start()
评论列表
文章目录