https://pypi.org/project/PyAutoGUI/
pip install PyAutoGUI
import pyautogui as pg
import time
# 关闭此python界面
pg.moveTo(3650,10)
pg.click()
#运行脚本的python界面
pg.moveTo(3570,60)
pg.click()
time.sleep(2)
# 关闭此python界面
pg.moveTo(3650,10)
pg.click()
#导入脚本
pg.moveTo(2400,410)
pg.rightClick()
pg.moveTo(2500,700)
pg.click()
# 选中脚本
pg.moveTo(1200,300)
pg.click()
pg.moveTo(1200,980)
pg.click()
# 稍微暂停一下
time.sleep(1)
#拖拽全局变量
pg.moveTo(3100,300)
time.sleep(1)
pg.drag(-900,-70,duration=2)
# 开始播放
pg.moveTo(1830,97)
pg.click()
PyAutoGUI使用展示
PyAutoGUI演示