

# https://www.globalsino.com/ICs/page4853.html
# Snipping tool: take a screen shot from the full screen

import pyautogui
import tkinter as tk

root=tk.Tk()

# set geometry and tilte
root.geometry("150x50")
root.title("")

# Full screen will be snipped if "region = ()" is removed.
def MyScreenShot():
    img = pyautogui.screenshot("C:\GlobalSino\images\TestScreenshot.png",
                               region = (200,300,400,400))    
   
button1=tk.Button(root, text="Take Screenshot", command=MyScreenShot)
button1.place(x=10, y=10)

root.mainloop()

