-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathscreenshotgui.py
More file actions
30 lines (22 loc) · 769 Bytes
/
screenshotgui.py
File metadata and controls
30 lines (22 loc) · 769 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
from screenshot import *
from setDirectory import *
import tkinter as tk
import sys
if __name__ == "__main__":
# Storage setup
getpath = createStoragePath()
# create a Agent object that is gonna take screenshot
myAgent = Agent()
# Initilize the GUI window
root = tk.Tk()
root.title("ScreenshotSP") # App title
root.iconbitmap("./assets/myIcon.ico") # App icon
root.geometry("250x50") # App default window resolution
frame = tk.Frame(root)
frame.pack()
button = tk.Button(frame, text="Take Screenshot",
command=lambda: myAgent.screenshot(getpath))
button.pack(side=tk.LEFT)
close = tk.Button(frame, text="close", command=sys.exit)
close.pack(side=tk.LEFT)
root.mainloop()