asweigart / asweigart/PyGetWindow
PyGetWindow returns wrong location
Open
- Dominant language
- Python
- Stars
- 422
- Forks
- 73
- PR merge metrics
- No merged PRs in 30d
Description
Here is my simple code to locate the Notepad++ opened on my screen. (Windows10)
import pygetwindow
window_name = 'new 1 - Notepad++'
window = pygetwindow.getWindowsWithTitle(window_name)[0]
print(window.topleft)
Output when executed>>Point(x=830, y=250)
The same code returns a different set of coordinates when I import PyAutoGUI. Here is the code and the output.
import pygetwindow
import pyautogui
window_name = 'new 1 - Notepad++'
window = pygetwindow.getWindowsWithTitle(window_name)[0]
print(window.topleft)
Output when executed>>Point(x=1038, y=312)
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.