Skip to content

Instantly share code, notes, and snippets.

@ajinzrathod
Created June 22, 2021 10:16
Show Gist options
  • Save ajinzrathod/be0e734ecc12aec8b4676c689bc9529c to your computer and use it in GitHub Desktop.
Save ajinzrathod/be0e734ecc12aec8b4676c689bc9529c to your computer and use it in GitHub Desktop.
# Search "Startup Applications" in App launcher
# Under name: Auto Screenshot Taker
# Under Command: /usr/bin/python3 /home/ajinkya/Documents/Ajinkya/Freelancing/screenshots.py
# Under Comment: Auto Screenshot Taker
# Now the script
# import py auto gui
import pyautogui
import time
from datetime import datetime
while True:
# Get Current time
now = datetime.now()
myScreenshot = pyautogui.screenshot()
# setting current datetime as image_filename
image_filename = now.strftime("%b-%d-%Y|%H:%M:%S")
# r stands for RAW means slashes will be considered for Folder Path.
myScreenshot.save(r"/home/ajinkya/Documents/Ajinkya/Freelancing/ss/" + str(image_filename) + ".png")
# Each screenshot Every 7 minutes
time.sleep(420)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment