可以,这个我做个钉钉打卡
你先自行百度pyautogui这个模块,然后学习咯,很简单的,一晚上就学会了
然后你发现这个能实现模拟鼠标点击,当然,你想用这个打卡的话很麻烦,需要弄模拟器
我就弄这个钉钉打卡是成功了,但是败于老师们恐怖的压堂...
import pyautogui
import time
answer=pyautogui.confirm(text='请确定您是否打卡',buttons=['是的','不是'])
pyautogui.FAILSAFE=True
if answer == '是的':
pyautogui.alert(text='您有15秒钟来将光标放在最小化旁边')
time.sleep(15)
pyautogui.dragTo(1231,124)
while answer=='是的':
pyautogui.dragTo(1231,124)
pyautogui.moveRel(-690,152)
pyautogui.click()
pyautogui.moveRel(307,342)
pyautogui.click()
pyautogui.typewrite('4-3')
pyautogui.press('enter')
time.sleep(2540)
pyautogui.alert(text='您将在100秒后再次自动打卡,请在100秒内将光标放在最小化旁边')
time.sleep(100)
continue
if answer=='不是':
pyautogui.alert(text='欢迎下次使用')
time那个我只用到一个,你百度一下就OK了 |