hi guys im new at coding im trying to create an infinite loop in the follow code
JavaScript
x
23
23
1
from pyautogui import *
2
import pyautogui
3
import time
4
import keyboard
5
import numpy as np
6
import random
7
import win32api, win32con
8
import sys
9
10
time.sleep (2)
11
12
color = (255, 255, 255)
13
a = pyautogui.screenshot()
14
15
for x in range(a.width):
16
for y in range(a.height):
17
if a.getpixel((x, y)) == (119, 44, 44):
18
pyautogui.click(x, y)
19
time.sleep(2)
20
pyautogui.click(3050, 1411)
21
time.sleep(35)
22
a = pyautogui.screenshot()
23
I tried with while but no luck, can someone help me please? Thanks for the attention and have a nice day(=
Advertisement
Answer
To make infinite loop just use
JavaScript
1
5
1
while True:
2
# Add your code
3
pass
4
5