Home>
When executing the code:
import pyautogui
import time
import random
pyautogui.PAUSE= 1
pyautogui.FAILSAFE= True
while 1== 1:
pyautogui.moveTo (1500, 1025, duration= (random.randint (1, 3))
pyautogui.click ()
randomik= random.uniform (0, 1)
if randomik >
one:
print ("Done:" + randomik + "Performing the first group of actions")
pyautogui.keyDown ('w')
time.sleep (random.uniform (2, 6))
pyautogui.keyUp ('w')
time.sleep (random.uniform (1, 2))
pyautogui.keyDown ('d')
time.sleep (random.uniform (1, 3))
pyautogui.keyUp ('d')
pyautogui.press ('space')
pyautogui.move (random.randint (813, 1109)), 0, duration= (random.randint (2, 4)))
elif randomik <
one:
print ("Done:" + randomik + "I'm performing the second group of actions")
pyautogui.keyDown ('s')
time.sleep (random.uniform (3, 7))
pyautogui.keyUp ('s')
time.sleep (random.uniform (2, 3))
pyautogui.keyDown ('a')
time.sleep (random.uniform (2, 4))
pyautogui.keyUp ('a')
pyautogui.press ('ctrl')
pyautogui.move ((random.randint (798, 1012)), 0, duration= (random.randint (1, 2))
Outputs:
pyautogui.click ()
^
SyntaxError: invalid syntax
Although previously there were no errors when executing this code
recalculate the brackets with the line above, here: pyautogui.moveTo (1500, 1025, duration= (random.randint (1, 3))
Jack_oS2021-02-23 15:33:42