I am trying to make a program using pyautogui to screenshot a part of my screen. Everything is working as I intend it to, except when I click on the screenshot button, the only way I found to make it possible for me to choose the region is by doing this : So here I essentially make the program wait
Tag: pyautogui
pyautogui throws me error message. How can I fix my code?
It gives me error message like below. How can I fix this? I made a code as below. I think that if x.size == 0: is the problem. When I do print(x), I get the same error message. Answer This was changed in version 0.9.41. After that point, if the window is not found, it raises an exception. Before that
How to simulate human keyboard input of a long text using Python?
I would like to simulate typing of huge text. I’ve tried to use pyautogui to do that, but I’t didn’t worked properly since the computer was not detecting the keys being pressed: I couldn’t think of another way to do that than using pynput.keyboard library, but as I have a huge text, that would not be a viable option. I
Tkinter – TTK – Button change state after click
how can i change the state of a button made with TTK in Python after i clicked it ? I want to disable the button START after i press it once and re-enable it after pressing STOP. I want this because my code creates a new duplicated thread everytime i press Start … so… i want to disable it… I
Python GUI Tkinter how to stop a script after pressing Start button
im new to programming in python but i made a simple GUI using Tkinter that has two Buttons, Start and Quit. When i press the Start button, the GUI freezes and i cant press the Quit button anymore … how can i fix that ? Answer You could try running your running function in its own thread so it doesn’t
What are ways to create a bot or script that detects monsters in a video game and click on it?
I’ve been trying to create a bot using python for an online mmo web game, and I am facing some issues. I’m using pyautogui, and basically, detects a certain RGB color of a pixel that the monster has and click on it, using the typical nested for loops. The issue here is that sometimes, the bot clicks on an environment
opencv error when converting a python file to an .exe file with pyinstaller
So I am trying to convert my python project to an exe file and run it, but when I do, I get an error like this: Failed to execute script ‘My project’ due to unhandled exception: ERROR recursion is detected during loading of “cv2” binary extensions. Check OpenCV installation. Here’s some of the code: any help would be appreciated. Answer
How to get the coordinate of a checkbox created by tkinter package on a screen
I created a graphical user interface that has 3 checkboxes by using the Checkbox class given in tkinter package. I want to retrieve the screen coordinate of each checkbox. I have been trying to use pyautogui.position() to retrieve the coordianates. However, those values seem wrong because when I used those coordinates for the pyautogui engine to click on the box,
ModuleNotFoundError: No module named ‘pyautogui’
I tried installing pyautogui in Visual Studio but whenever I run the following program: I get the following error: I tried the available solution import error for pyautogui But it doesn’t work, So please help. Answer According to your description, please refer to the following: Please use the command “python –version” or “pip –version” in the VS Code terminal to
Pillow Not installing on Apple Silicon
I am having a nightmare of a time installing Pillow on my apple silicon. Everytime I attempt to install it, it throws a truly massive error which I have posted below. It says wheel is not installed but it is installed. It also says to refer to the Pillow page which I have done. I also installed homebrew and tried