Welcome, guest | Sign In | My Account | Store | Cart

Tested on Linux and Windows-XP, Python 2.6 ...

Counts down to a number and takes a screenshot. I simplified one of my long lost screenshot taking codes for linux removing sound, graphics and all other unnecessary bits.

Python, 8 lines
1
2
3
4
5
6
7
8
import time
import ImageGrab
def screeny():
    for ii in range(1, 11, 1)[::-1]:
        time.sleep(1)
        print ii
    img=ImageGrab.grab()
    img.save(r"C:\blblblblblblaa\screeny.jpg")

To edit the countdown time change the 2nd argument in the "range" function to the desired number+1. To count up remove the "[::-1]".

Any other questions?

Created by me me on Thu, 3 Dec 2009 (MIT)
Python recipes (4591)
me me's recipes (2)

Required Modules

Other Information and Tasks