我正在尝试使用pyauthogui自动平滑地移动鼠标。为此,我使用了tween函数,如easeOutQuad()
、easeOutElastic()
、easeInCubic()
等。
问题是鼠标的移动方式与默认函数pyauthogui.linear()
相同。在
我已经测试了这个与微软油漆应用程序和喷枪工具,看看它是否有效。所以我的问题是,我有没有遗漏什么?在
使用: python 3.5 pyautogui 0.9.41版
import pyautogui
import time
# Needed time to set focus to Paint app
time.sleep(2.5)
pyautogui.dragRel(800, 0, 2)
pyautogui.moveRel(xOffset=-800, yOffset=20, duration=0)
pyautogui.easeOutQuad(1)
pyautogui.dragRel(800, 0, 2)
pyautogui.moveRel(xOffset=-800, yOffset=20, duration=0)
pyautogui.easeOutElastic(1)
pyautogui.dragRel(800, 0, 2)
pyautogui.moveRel(xOffset=-800, yOffset=20, duration=0)
pyautogui.easeInCubic(1)
pyautogui.dragRel(800, 0, 2)
pyautogui.moveRel(xOffset=-800, yOffset=20, duration=0)
目前没有回答
相关问题 更多 >
编程相关推荐