I'm using pyautogui for my project, here is a snippets of the code
# Other function inside while loop
time.sleep(8)
Click('join_audio.png')
break
Click() is a class i made that locate the image and click it, but i want the action to start when that image has appeared on the screen instead of waiting for 8 second which is not that effective. Is there a way to do this in python?