前言
通过python实现发送连续的消息,因为生活中老是打字很慢,刚好可以通过python实现自动给好友、群、讨论组发送qq消息。其工作流程是:调用库——>确定光标的位置——>循环发送要说的话。
一、调用库
安装pyautogui调用库,在cmd里面输入以下代码。
pip install pyautogui
之后会呈现以下现象,表示我们需要的库已经调用成功。
Requirement already satisfied: pyautogui in e:\软件\python\lib\site-packages (0.9.53)
Requirement already satisfied: pymsgbox in e:\软件\python\lib\site-packages (from pyautogui) (1.0.9)
Requirement already satisfied: PyTweening>=1.0.1 in e:\软件\python\lib\site-packages (from pyautogui) (1.0.4)
Requirement already satisfied: pyscreeze>=0.1.21 in e:\软件\python\lib\site-packages (from pyautogui) (0.1.28)
Requirement already satisfied: pygetwindow>=0.0.5 in e:\软件\python\lib\site-packages (from pyautogui) (0.0.9)
Requirement already satisfied: mouseinfo in e:\软件\python\lib\site-packages (from pyautogui) (0.1.3)
Requirement already satisfied: Pillow>=4.0.0 in