here’s my code:
import pyautogui
screen_width, screen_height = pyautogui.size()
def scale_positions(x, y, base_width=2560, base_height=1440):
return int(x * screen_width / base_width), int(y * screen_height / base_height)
pyautogui.moveTo(*scale_positions(1415, 973))
are goal is to despite the different resolution of 2 screen that a MoveTo with pyautogui is done in the same place but it doesn’t work
I change my resolution (with the nvidia control panel) from 2560×1440 (my native resolution) to 1920×1080 and the cursor isn’t in the same place (I’ve also done the test and pyautogui tells me that my resolution is 1920×1080 when I change it, so it’s not because I’m changing it and I don’t have a native 1920×1080 screen).