Over a million developers have joined DZone.

Screen Log

·
save the code in .pyw file if you don't want a command-line window show when running.


from ImageGrab import grab
from time import sleep
from time import localtime,strftime

while 1:
    im=grab()
    im=im.convert('L')
    filename=strftime('%d%H%M',localtime())
    im.save(r'c:\tmp\%s.jpg'%filename,quality=15)
    sleep(300)
    i=i+1
Topics:

Opinions expressed by DZone contributors are their own.

The best of DZone straight to your inbox.

SEE AN EXAMPLE
Please provide a valid email address.

Thanks for subscribing!

Awesome! Check your inbox to verify your email so you can start receiving the latest in tech news and resources.
Subscribe

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}