From ee94ad21b5eecd62846adab7f5318fffbb7960d8 Mon Sep 17 00:00:00 2001 From: s47700 <s47700@bht-berlin.de> Date: Sat, 23 Mar 2024 16:24:36 +0100 Subject: [PATCH] Upload New File --- api attempts/click.py | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 api attempts/click.py diff --git a/api attempts/click.py b/api attempts/click.py new file mode 100644 index 0000000..f219941 --- /dev/null +++ b/api attempts/click.py @@ -0,0 +1,18 @@ +import pyautogui + +# Function to click at a specific screen location +def click_at(x, y): + pyautogui.click(x, y) + +# Example function to check the output and perform a click +def check_output_and_click(output): + if output == 1: + # Replace (x, y) with the coordinates where you want to click + click_at(x=2995, y=107) # Example coordinates (change to your desired location) + print("Clicked at (100, 100)") + else: + print("Output is not 1, skipping click.") + +# Example usage +output_value = 1 # Replace this with your actual output value +check_output_and_click(output_value) -- GitLab