From 9ded888990c88d338d590e36d79f2470c7b5ca79 Mon Sep 17 00:00:00 2001 From: Prathima Kadari <74645302+prathimacode-hub@users.noreply.github.com> Date: Sat, 10 Apr 2021 23:44:36 +0530 Subject: [PATCH 1/2] Create README.md --- ScreenshotTaker/README.md | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 ScreenshotTaker/README.md diff --git a/ScreenshotTaker/README.md b/ScreenshotTaker/README.md new file mode 100644 index 0000000..d0117c1 --- /dev/null +++ b/ScreenshotTaker/README.md @@ -0,0 +1,3 @@ +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. +This is the task which most people use in day to day lives From 5ffcebced7a1e45029c4ffa9e1b8af4cdd288257 Mon Sep 17 00:00:00 2001 From: Prathima Kadari <74645302+prathimacode-hub@users.noreply.github.com> Date: Sat, 10 Apr 2021 23:45:37 +0530 Subject: [PATCH 2/2] Add files via upload --- ScreenshotTaker/ScreenshotTaker.py | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 ScreenshotTaker/ScreenshotTaker.py diff --git a/ScreenshotTaker/ScreenshotTaker.py b/ScreenshotTaker/ScreenshotTaker.py new file mode 100644 index 0000000..5ad8997 --- /dev/null +++ b/ScreenshotTaker/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() +