Created
January 9, 2021 18:14
-
-
Save JayantGoel001/8520fb0ed86c79224312a3fadaf1d229 to your computer and use it in GitHub Desktop.
Grab Screenshot using pyautogui and tkinter to create GUI
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import pyautogui | |
from tkinter import * | |
win = Tk() | |
win.title("Grab ScreenShot") | |
canvas1 = Canvas(win, width=300, height=300) | |
canvas1.pack() | |
def myScreenShot(): | |
ss = pyautogui.screenshot() | |
ss.save("ss.png") | |
button = Button(win, text='Grab A Screenshot', command=myScreenShot, bg='green', fg='white', font=15) | |
canvas1.create_window(150, 150, window=button) | |
win.mainloop() |
Author
JayantGoel001
commented
Jan 9, 2021
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment