Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 33 additions & 0 deletions ScreenShot_app.py
Original file line number Diff line number Diff line change
@@ -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()