Wednesday, June 20, 2007

Grab screen capture programatically

Pre-requisite:
  1. Python 2.5 for Windows
  2. Python Imaging Library (PIL).
Install Python 2.5 for Microsoft Windows. Make sure that you have administrative rights to be able to install the application properly. After having verified that Python is installed and working, install Python Imaging Library. See below for a sample of screen capture python script.
#--<-start code here->--
import ImageGrab;
img = ImageGrab.grab
()img.save("D:\\test.jpg")

#--<-end code here->--
~ts~

No comments:

Install Winget on Windows 2022 or Windows 10 LSTC

Install Winget on Windows 2022 or Windows 10 LTSC Install Pre-reqs Install Microsoft.UI.Xaml/2.8.6 Navigate to https://www.nuget.org/pa...