Go Down

Topic: project evolution timelapse (Read 545 times) previous topic - next topic

frank26080115

I wrote an AutoIt script that runs once per second, it detects when EAGLE is the active window, then checks if anything has changed on the screen, then it takes a screen shot of the EAGLE window if the screen has changed. The screen shots are saved with the current date and time.

The idea is that I can have this loop in the background and work on a project, and end up with a nice animation of how the project evolves.

Here I am making a library component from scratch. 25MB GIF animation. http://min.us/mT4zjC8AF

I forgot to give the footprint ">NAME" on the "tName" silkscreen layer, probably forgot some other minor things that I fixed later, so don't take this animation as some sort of tutorial. Note that the capture script isn't smart enough to capture sub dialogs, so it never captured the pin assignment dialog, which took a long time near the end. It also never captured the times when I had to type in anything manually.

The AutoIt script is below, edit it to suit your needs, the folder path may not be automatically created so do that manually.
Code: [Select]
#include <ScreenCapture.au3>

Dim $prevPixChkSum

While True
   $winList = WinList()
   $winCnt = $winList[0][0]
   ;ConsoleWrite($winCnt)
   For $i = 1 To $winCnt Step 1
  If StringInStr($winList[$i][0], "EAGLE", 1) And (StringInStr($winList[$i][0], "Board", 1) Or StringInStr($winList[$i][0], "Schematic", 1) Or StringInStr($winList[$i][0], "Library", 1)) Then
;ConsoleWrite("Found")
If WinActive($winList[$i][0]) Then
;ConsoleWrite("Active")
$winPosInfo = WinGetPos($winList[$i][0])
$filePath = "C:/EAGLECaps/" & @YDAY & @HOUR & @MIN & @SEC & ".png"
;ConsoleWrite($filePath)
$curPixChkSum = PixelChecksum($winPosInfo[0] + 150, $winPosInfo[1] + 150, $winPosInfo[0] + $winPosInfo[2] - 150, $winPosInfo[1] + $winPosInfo[3] - 150, 4)
If $curPixChkSum <> $prevPixChkSum Then
   _ScreenCapture_Capture($filePath, $winPosInfo[0], $winPosInfo[1], $winPosInfo[0] + $winPosInfo[2], $winPosInfo[1] + $winPosInfo[3], False)
   $prevPixChkSum = $curPixChkSum
EndIf
EndIf
  EndIf
   Next
   
   Sleep(1000)
WEnd


I'm thinking of adding all the other tools I use to the windows it captures, such as Notepad2, Notepad++, Eclipse, Visual Studio, SolidWorks, etc. It's not hard to edit this script.
Freelance engineer, consultant, contractor. Graduated from UW in 2013.

robtillaart


looks good,

convert the animated gif to an mpeg somehow to minimize size?
Rob Tillaart

Nederlandse sectie - http://arduino.cc/forum/index.php/board,77.0.html -
(Please do not PM for private consultancy)

frank26080115

MP4 compression at 60% quality gave me a bit over 4MB

Here it is on YouTube

http://www.youtube.com/watch?v=0mxv3g4CEuY
Freelance engineer, consultant, contractor. Graduated from UW in 2013.

Go Up