From ad7609c6c277831e5fb5809272139f7db8ccdbeb Mon Sep 17 00:00:00 2001 From: nexcvon Date: Thu, 20 Apr 2017 11:04:00 +0800 Subject: [PATCH] Fix install failing on Windows XP The API `SetProcessDPIAware` does not exist on Windows XP. --- pyautogui/_pyautogui_win.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pyautogui/_pyautogui_win.py b/pyautogui/_pyautogui_win.py index fd1c217..2b72d0c 100644 --- a/pyautogui/_pyautogui_win.py +++ b/pyautogui/_pyautogui_win.py @@ -12,7 +12,10 @@ # Fixes the scaling issues where PyAutoGUI was reporting the wrong resolution: -ctypes.windll.user32.SetProcessDPIAware() +try: + ctypes.windll.user32.SetProcessDPIAware() +except AttributeError: + pass """