Skip to content

Instantly share code, notes, and snippets.

@mazulo
Created February 24, 2014 19:12
Show Gist options
  • Save mazulo/9194880 to your computer and use it in GitHub Desktop.
Save mazulo/9194880 to your computer and use it in GitHub Desktop.
Capturar uma screenshot da tela em um dado intervalo de tempo
import pyscreenshot as ImageGrab
from time import strftime
import time
hora_atual = strftime('%H:%M')
i = 0
while hora_atual != '15:54':
ImageGrab.grab_to_file('img-%d.png' % i)
i += 1
time.sleep(0.5)
hora_atual = strftime('%H:%M')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment