From 168287d5443aad4582fddda7c6e7e2fecf693be6 Mon Sep 17 00:00:00 2001 From: Prathima Kadari <74645302+prathimacode-hub@users.noreply.github.com> Date: Thu, 22 Apr 2021 17:21:58 +0530 Subject: [PATCH] Added Screenshot Taker Script This is python script of screenshot taker. It takes the screenshot of the page you are in by clicking 'Take Screenshot' button once you run it. It's a prompt application most people use in their day to day lives. --- ScreenshotTaker.py | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 ScreenshotTaker.py diff --git a/ScreenshotTaker.py b/ScreenshotTaker.py new file mode 100644 index 0000000..5ad8997 --- /dev/null +++ b/ScreenshotTaker.py @@ -0,0 +1,19 @@ +import pyautogui +import tkinter as tk +from tkinter.filedialog import * + +root=tk.Tk() + +canvas1=tk.Canvas(root,width=300,height=300) +canvas1.pack() + +def takeScreenshot(): + myScreenshot=pyautogui.screenshot() + save_path=asksaveasfilename() + myScreenshot.save(save_path+"_screenshot.png") + +myButton=tk.Button(text="Take Screenshot", command=takeScreenshot,font=10) +canvas1.create_window(150,150,window=myButton) + +root.mainloop() +