1.练习打字
在Typing Club练习打字
2.练习上传档案
3.下载及使用pyperclip模组
4.下载及使用pyautogui模组
结合前面的上传档案及pyperclip外加whereisthemouse,pyautogui来做出自动开启档案及查询的功能
import pyautoguiimport pypercliptry: with open ("d:/aaa.txt","r",encoding='utf8') as file: file=file.readlines() for L in file: pyperclip.copy(L.strip()) # L.strip() #删除头尾空格 pyautogui.click((175,48)) pyautogui.time.sleep(2.0) pyautogui.hotkey('ctrl','a') pyautogui.time.sleep(2.0) pyautogui.hotkey('ctrl','v') pyautogui.hotkey('enter')except:print("error")