Advertisement
Guest User

screenShot.py

a guest
Jan 9th, 2018
226
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.49 KB | None | 0 0
  1. import pyscreenshot as ImageGrab
  2. from time import sleep
  3.  
  4. #----------------------------------------
  5. #Please Change
  6. x_pad = 236
  7. y_pad = 112
  8. x_width = 1028
  9. y_length = 703
  10. #----------------------------------------
  11.  
  12.  
  13.  
  14. if __name__ == "__main__":
  15.     print("Enter name of screen shot")
  16.     filename = input() #get name of screen shot
  17.     # part of the screen
  18.     sleep(5)
  19.    
  20.     im=ImageGrab.grab(bbox =(x_pad,y_pad,x_width,y_length))
  21.    
  22.     im.save("./nextBlock/" + filename + ".png")
  23.    
  24.  
  25. #-#
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement