1

I'm using pyautogui to take few screenshots per second and save them. pyautogui save the screenshot without the cursor, can I take the screenshot with it by default (without edit the photo)?

This is the code I'm using:

import time
import pyautogui


def takeScreenshot(count):
    myScreenshot = pyautogui.screenshot()
    myScreenshot.save(r'imgs\screenshot_'+str(count)+'.png')
    time.sleep(0.2)
    takeScreenshot(count+1)

takeScreenshot(0)
General Grievance
  • 4,555
  • 31
  • 31
  • 45
  • Does not seem possible. See https://stackoverflow.com/questions/60264704/i-want-to-display-mouse-pointer-in-my-recording – PM Laforest Oct 15 '21 at 00:47
  • 1
    as I know `pyautogui` uses external programs to take screenshot. On Linux it uses program `scrot` which has option `--pointer` and you could use `subprocess.call` to run directly `scrot` with option `--pointer` – furas Oct 15 '21 at 03:29
  • There are operating system specific ways to do this. If you're on Windows, you can use the Windows API to temporarily set an empty cursor. I don't know of any system-independent way of doing so. – Tim Roberts Dec 22 '21 at 19:05
  • Does this answer your question? [i want to display mouse pointer in my recording](https://stackoverflow.com/questions/60264704/i-want-to-display-mouse-pointer-in-my-recording) – wovano Jun 13 '22 at 13:18

0 Answers0