15 lines
439 B
Python
Raw Normal View History

2022-09-25 14:54:22 +04:30
import pyautogui
from time import sleep
def screenshot_fun():
print("Screenshot program runs on console\nchange the sleep time if you can the screenshot captured the terminal also")
sleepTimer = 2
print(f"You've {sleepTimer} to minimize the terminal window")
2022-09-25 15:02:44 +04:30
sleep(sleepTimer)
2022-09-25 14:54:22 +04:30
print("Captured the screen now")
screenshot_img = pyautogui.screenshot()
screenshot_img.save("screen.png")
if __name__ == '__main__':
screenshot_fun()