Questions tagged [pyautogui]

PyAutoGUI is a cross-platform GUI automation Python module used to programmatically control the mouse and keyboard.

Official document.

PyAutoGUI lets your Python scripts control the mouse and keyboard to automate interactions with other applications. The API is designed to be as simple. PyAutoGUI works on Windows, macOS, and Linux, and runs on Python 2 and 3.

PyAutoGUI has several features:

  • Moving the mouse and clicking or typing in the windows of other applications.
  • Sending keystrokes to applications (for example, to fill out forms).
  • Take screenshots, and given an image (for example, of a button or checkbox), find it on the screen.
  • Locate an application’s window, and move, resize, maximize, minimize, or close it (Windows-only, currently) Display message boxes for user interaction while your GUI automation script runs.
1828 questions
0
votes
2 answers

unable to successfully import/ use pyautogui library in my IDE

I am attempting to use a small script to move my mouse slightly every minute or two to make the appearance that I am sitting at my desk (dont tell my boss please) is anyone able to assist in why this might be happening? from my command prompt I was…
pepperjack
  • 67
  • 7
0
votes
0 answers

Read text in particular location with python

I am working with a table with many rows (lets call them a,b,c,d, etc) and with the actual value this rows have in a particular column (that value is a bit 0,1 that can change continously). So a screenshot in a particular moment could be something…
0
votes
1 answer

Typewrite command of pyautogui module is not giving desired output

I working with pyautogui module and performed following steps: imported pyautogui. gave pyautogui.hotkey('winleft') Worked properly and window popped up. Now I want to launch chrome. Gave command pyautogui.typewrite('chrome\n') Instead of…
Iltu
  • 1
0
votes
0 answers

Locate an element in an image resized in Python

I'm create a project in Python using PyAutogui and I need to locate an object on the screen. First of all I crop a screenshot, and after that, I use pyautogui.locateOnScreen('element.png') for found the location. The problem is, the element…
Fasertio
  • 61
  • 1
  • 1
  • 4
0
votes
0 answers

How to use an image to identify it in another in python?

I am working on a gui automation project. I have a screenshot of an object. IF THE OBJECT IS IN ANOTHER IMAGE THE CODE HAVE TO DO ANY ACTION. I am a beginner and I don't know about this kinda stuff. PLEASE HELP ME. THANKS FOR THOSE HELPS IN ADVANCE!
0
votes
1 answer

Is it possible to create a desktop application with python and imported libraries?

I am a beginner at coding. I use python and windows 10 I wrote a very simple code that captures and then opens an image, then loops match template in order to determine what is the object in that image using a list containing all the possible…
0
votes
3 answers

How do I add variable to pynput

#import modules from pynput.keyboard import * import time import pyautogui #Ask user for ID and Pass ID = int(input('Enter ID: ')) Pass = int(input('Enter Pass: ')) #Enable controller k = Controller() #Press and Release…
0
votes
3 answers

"pyautogui" doesn't respond

I wrote a small code with python. But this part of the code doesn't work when game focused on and it doesnt respond back. pyautogui.moveRel(-2, 4) Also this part works when my cursor appear in menu or etc. too. But when i switched into game (when my…
ChaTho
  • 662
  • 7
  • 10
0
votes
1 answer

locateCenterOnScreen receives errors once the image is undetected instead of trying it over

The code works when it sees the image, however it gives up (an error that says "cannot unpack non-iterable NoneType object") instead of retrying once the image it's looking is affected by certain circumstance like moving a window that blocks the…
0
votes
1 answer

How to increase the fps of screen recorder in cv2

I have written a code to record the screen recorder using python but when i see the output then i found that its fps is very low .Is there any better code than mine to increase the fps of the screen recorder. If yes then please reply. Here is mine…
0
votes
1 answer

How to save a webpage using "control + S" in python?

I am using the following code, but unable to find the file "test.html" on my local computer on the specified path. Also, the code does not give an error when I run it. Could someone please help me with locating my file? pyautogui.hotkey('ctrl',…
magarwal
  • 1
  • 1
0
votes
1 answer

Pyautogui how to click radio buttons

I am working on trying to automate the installation of software for a work project. I want to do this in python, then convert it to an exe. Removing the need for installing Python on the virtual machines that are the target for installation. I am at…
Dave
  • 95
  • 13
0
votes
1 answer

How to use computer while running pyautogui script on windows 10?

I have developed a python script which uses pyautogui to automate some stuff. So is it possible on windows 10 to run this script while using computer simultaneously? I mean when script runs, it uses mouse and keyboard so it is not possible to use…
d y
  • 1
  • 1
  • 4
0
votes
2 answers

How can I get pyautogui to print words from a string?

I'm working on a project which I want to be able to take words separated by a space, turn it into a string using .split() and then have pyautogui print it out with an "enter" being pressed in between each word. This is the code I have so far…
rosk2006
  • 1
  • 1
0
votes
1 answer

python auto gui not clicking

So the start of my program opens up a web page and then clicks on it. This is my code. It opens up the page fine, but doesn't click. I tried to make it move the mouse first, and the mouse moves exactly where I want but doesn't click. I have the…