asweigart / pyautogui

A cross-platform GUI automation Python module for human beings. Used to programmatically control the mouse & keyboard.
BSD 3-Clause "New" or "Revised" License
10.47k stars 1.27k forks source link

v0.9.54 screenshot() method not exists #814

Open willyan2002 opened 1 year ago

willyan2002 commented 1 year ago

I used PyAutoGUI on windows platform to pickup the RGB value of mouse click, it worked well but I forget the Version of PyAutoGUI, the code as bellow.

import pyautogui
        pos_x, pos_y = pyautogui.position()
        rgb = pyautogui.screenshot().getpixel((pos_x, pos_y))

Now I installed version 0.9.54, but the screenshot() method does not exist, but it's still valid in the user manual. Is there anything wrong ? image image

MRsoymilk commented 1 year ago

It works fine on my computer. Maybe this function doesn't show up in PyCharm

xiongwujun commented 1 year ago

it not exists in my computer too

shuish0071 commented 1 year ago

It works fine on my computer. But this function doesn't show in PyCharm. I don't konw why.

mikigo commented 11 months ago

use pyscreeze.screenshot() instead of pyautogui.screenshot().

Edmond-Lee-Zse-Wong commented 11 months ago

which IDE do you use? I use vscode and my pyautogui version is 0.9.53, pyautogui.screenshot() works well on my Windows laptop. Maybe you can consider get the version back to 0.9.53.