云顶之弈换中立python脚本
import pynput keyboard = pynput.keyboard.Controller() mouse = pynput.mouse.Controller() def on_release(key): try: if key == pynput.keyboard.Key.backspace: mouse.press(pynput.mouse.Button.left) mouse.release(pynput.mouse.Button.left) print('按了一下鼠标') keyboard.press('E') keyboard.release('E') print('按了一下E') if key == pynput.keyboard.Key.esc: print('退出') return False except AttributeError: print('special key {0} pressed'.format( key)) def on_press(key): print('按了一下{0}'.format(key)) print('正在启动程序....请稍等几秒.单击英雄之后按backspace替换成野怪.按ESC之后退出') with pynput.keyboard.Listener( on_press=on_press, on_release=on_release) as listener: listener.join()
微信搜索桔子科研或者扫描二维码,第一时间获取编程有趣的知识和最新科研学术成果。
![](https://images.cnblogs.com/cnblogs_com/godoforange/1390071/o_211204035711_qrcode_for_gh_7f100002de19_344.jpg)