这应该是Python游戏中的程序bot。在代码中犯了几个错误,发现它们我帮了忙
如果不难指出详细的答案,我将不胜感激
import pyautogui
import time
m=0
while m<=3600:
m=m+1
print("sesion")
im = pyautogui.screenshot(region=(0,0, 298, 1024))
time.sleep(5)
if locateOnScreen('1.png') == im:{
pyautogui.press('esc')
time.sleep(0.5)
pyautogui.locateOnScreen('2.png')
pyautogui.click(clicks=2, interval=0.25)
time.sleep(2)
pyautogui.press('up')
time.sleep(0.5)
time.sleep(2)
pyautogui.press('enter')
time.sleep(0.5)
time.sleep(2)
pyautogui.press('enter')
time.sleep(360)
pyautogui.press('end')
time.sleep(0.5)
pyautogui.typewrite('Dctv ghbdtn/ Rjve-nj yflj ghjrfxrf& Tckb lf/ Gbibnt d cjifk', interval=0.25)
pyautogui.press('enter')
time.sleep(10)
elif (pyautogui.locateOnScreen('4.png')):{
pyautogui.press('enter')
time.sleep(0.5)
}
else:
pyautogui.press('end')
time.sleep(0.5)
pyautogui.typewrite('Dctv ghbdtn/ Rjve-nj yflj ghjrfxrf& Tckb lf/ Gbibnt d cjifk', interval=0.25)
pyautogui.press('enter')
time.sleep(10)
}
pyautogui.press('esc')
time.sleep(0.5)
pyautogui.locateOnScreen('2.png')
pyautogui.click(clicks=2, interval=0.25)
time.sleep(2)
pyautogui.locateOnScreen('3.png')
pyautogui.click(clicks=2, interval=0.25)
time.sleep(2)
pyautogui.press('enter')
time.sleep(2)
pyautogui.press('enter')
time.sleep(360)