From 31d0772cfab76ef790c0ba25fa9c85bca4793762 Mon Sep 17 00:00:00 2001 From: Julius Tranquilli Date: Mon, 25 Sep 2023 15:24:51 -0400 Subject: [PATCH 1/2] Updated documentatoin in __init__.py to warn retina display users of pixel density issues --- pyautogui/__init__.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pyautogui/__init__.py b/pyautogui/__init__.py index 43aebd5..cc01ac7 100644 --- a/pyautogui/__init__.py +++ b/pyautogui/__init__.py @@ -779,6 +779,12 @@ def size(): Returns: (width, height) tuple of the screen size, in pixels. + + Note that in the case of Macs with retina displays, due to greater pixel density of 2x2 per logical pixel, x and y values are multiplied by 2. As a result, locating the desired position of the screen will most likely require a line of code that looks like + + pyag.click(loc.x/2,loc.y/2) + + to account for the 2:1 correspondence of pixels """ return Size(*platformModule._size()) From 5655211f2174a6a993572f8d8c5882508e482a69 Mon Sep 17 00:00:00 2001 From: Julius Tranquilli Date: Tue, 26 Sep 2023 17:56:11 -0400 Subject: [PATCH 2/2] Added a function to click on a button using a screenshot of that button as input --- .DS_Store | Bin 0 -> 6148 bytes pyautogui/__init__.py | 14 +++++++++++++- 2 files changed, 13 insertions(+), 1 deletion(-) create mode 100644 .DS_Store diff --git a/.DS_Store b/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..d1b3629b7535c0b7548c8d9bb2edb08dbd271b8d GIT binary patch literal 6148 zcmeHKPm9w)9Q{qVYZHsmgMuD}fY(ynwTR-S?Y3&cRoPTMsMKbYU4z+7X;QmV3cc%R z@GE%sgXnkhq;LKxX<89Hh?M!k%$rQ!n@QeGW->&?I#a(vR3Rb@Nnr6jvJD~bi?kL6 zU2_4*WE+p@kX))!N@r_qQ(+u14*YKph;O${ZF)ijx=-2fH|!<&6kqt9)6r?`8rWRS7wXV8h*_J)5T$#^r+}f);jb?LEb>@xwUZd*Vyxm+ZZ0pjs z>vs-^Z=%zf3v&?+OS=p)RkHB`7aPoY>rUc`$HF$Dw6P`hFeqI*ki&RN{;FMaVtvd^ zEQ=BfVD1z~*M!+QzL-*3{w}xyH0j1km1UOXke#VXksmfWnX+tjv)!Qw)+%rJYnrz+ z4j2di!U3^9I7k9p8kY*?(t%7K0f0qR%RpKDEC`LGv88dT5O)wvNr6hr^bvz8IqDtF zYiV36RB~ea@WFJ?OrKDg>>cepl1{9p(B#GeTi0Gr?6nTkD