It is given: there is a window and there is a script that takes data by creating screenshots in given coordinates, but if the window is moved or resized, everything breaks. For a script I use pyautogui. Please advise how this problem can be solved. thank

  • Through the operating system to find out the coordinates of the window, for Windows it is winapi - gil9red
  • How does this help? The script takes a lot of screenshots in different parts of the window, and if the window changes position, we will get the coordinates of the new window, but the coordinates of the screenshots in the script will not change from this - bswan
  • Knowing the coordinates of the window and its size, you can shift the coordinates of the screenshot area - gil9red

0