Coding Global Background
Coding Global

need help with pyauto gui locate

Archived 2 years ago
1 messages
1 members
Created 2 years ago
Updated 2 years ago
Open in Discord
T
tcyt7
Script Kiddie!
        choice_image = os.path.join(base_dir, f'choice{answer}.png')
        choice_location = pyautogui.locateOnScreen(choice_image)

        if choice_location is not None:
            pyautogui.click(choice_location)
            time.sleep(0.5)
            pyautogui.click(2023, 1256)
        else:
            print(f"Could not find the choice image for {answer}")

    else:
        print("OCR did not return any results.")


thats my project structure
need help with pyauto gui locate

Replies (1)