-Printscreen-: Difference between revisions

From XPUB & Lens-Based wiki
(Created page with "PRINT SCREEN This code was written as a tool to document a process of work or research with the computer; it makes a print screen every minute for an hour and saves it as a J...")
 
No edit summary
Line 1: Line 1:
PRINT SCREEN
--PRINT SCREEN--


This code was written as a tool to document a process of work or research with the computer; it makes a print screen every minute for an hour and saves it as a JPEG. Once the code runs out the images are converted into a gif file generating an overview of the working process (imagemagik).
This code was written as a tool to document a process of work or research with the computer; it makes a print screen every minute for an hour and saves it as a JPEG. Once the code runs out the images are converted into a gif file generating an overview of the working process (imagemagik).
Line 6: Line 6:
Control over the speed of display in order to read the lines; right now the gif just gives a vertiginous insight of what I was busy with for an hour without allowing actual use of the information.
Control over the speed of display in order to read the lines; right now the gif just gives a vertiginous insight of what I was busy with for an hour without allowing actual use of the information.


--
<source lang="python">
 
from PIL import ImageGrab
 
import datetime, time
 
start = datetime.datetime.now ()
 
now = datetime.datetime.now()
 
intervalo = now - start
 
while intervalo.total_seconds()<= 3600:
 
    now = datetime.datetime.now()
 
    intervalo = now-start
 
    print intervalo
 
    im = ImageGrab.grab()
 
    printscreen = str(now.strftime("%Y-%m-%d_%H-%M"))+'.jpg'
 
    im.save(printscreen)
 
    time.sleep(60)
 
#thanks Lucia
 
</source>

Revision as of 21:14, 7 December 2013

--PRINT SCREEN--

This code was written as a tool to document a process of work or research with the computer; it makes a print screen every minute for an hour and saves it as a JPEG. Once the code runs out the images are converted into a gif file generating an overview of the working process (imagemagik).

to work out: Control over the speed of display in order to read the lines; right now the gif just gives a vertiginous insight of what I was busy with for an hour without allowing actual use of the information.

from PIL import ImageGrab

import datetime, time

start = datetime.datetime.now ()

now = datetime.datetime.now()

intervalo = now - start

while intervalo.total_seconds()<= 3600:

    now = datetime.datetime.now()

    intervalo = now-start

    print intervalo

    im = ImageGrab.grab()

    printscreen = str(now.strftime("%Y-%m-%d_%H-%M"))+'.jpg'

    im.save(printscreen)

    time.sleep(60)

#thanks Lucia