
今天给大家分享一段用python编写的代码,短短11行,即可实现培训视频的无间断播放,有效地解放了双手。现将代码作以分享!

python无间断学习代码
import pyautoguiimport timedef play():AuotPlay = pyautogui.locateOnScreen('autoclick/AutoPlayer.png', confidence=0.9)if AuotPlay is not None:clickpoint = pyautogui.center(AuotPlay)pyautogui.click(clickpoint[0], clickpoint[1] , duration=0.25, button='left')time.sleep(10)if __name__ == '__main__':while True:play()
说明:AutoPlayer.png为学习下一节的网页截图,如下图所示:

感谢观看
2023-11-23


