pepijndevos/PyMouse — Issue #12: Error with screen_size() in Windows
Author: gsbabil
Created: 2011-12-05 01:47:55+00:00
State: open

Hi, I am getting errors as following on Windows:

---
Traceback (most recent call last):
File "", line 1, in
File "pymouse\windows.py", line 49, in screen_size
def screen_size(self):
NameError: global name 'GetSystemMetrics' is not defined
---

It was fixed by replacing the screen_size() inside window.py with the following:

---
def screen_size(self):
width = windll.user32.GetSystemMetrics(0)
height = windll.user32.GetSystemMetrics(1)
return width, height
---