From 0f9cd4f5ddf26ac5e7fff1f9ffa97f79740336dc Mon Sep 17 00:00:00 2001 From: amitdudhankar <72137523+amitdudhankar@users.noreply.github.com> Date: Wed, 30 Sep 2020 18:36:30 +0530 Subject: [PATCH] Takes the screenshot of the desktop computer I've created the python program which takes the screenshot of the windows screen and I've added the same --- ScreenShot_app.py | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 ScreenShot_app.py diff --git a/ScreenShot_app.py b/ScreenShot_app.py new file mode 100644 index 0000000..d1f0c4b --- /dev/null +++ b/ScreenShot_app.py @@ -0,0 +1,33 @@ +# Main code for taking Screenshot... + +import time +import pyautogui +import tkinter as tk + +def screenshot(): + name = int(round(time.time() * 1000)) + name = 'C:/Users/HP/PycharmProjects/Real_Time_Projects/ScreenShots/{}.png'.format(name) + img = pyautogui.screenshot(name) + img.show() + +# GUI coding starts from here... + +root = tk.Tk() +frame = tk.Frame(root) +frame.pack() + +button = tk.Button( + frame, + text = "Take Screenshot", + command = screenshot +) + +button.pack(side = tk.LEFT) +close = tk.Button( + frame, + text = "Quit", + command = quit +) +close.pack(side = tk.LEFT) + +root.mainloop() \ No newline at end of file