BasicOs Posted February 16, 2005 Share Posted February 16, 2005 (edited) It is a savescreen-logger, it logs screen captures continously, it recycles the image files and keep the number of files created to fit the select period of time size.(next will change not only to period but to size)by example if you choose one day logging when finishing the day, it replaces oldest files for new ones.estimated space needed, Time-Space: one hour 1 fps only: 70kb x 3600=252Mb, one day=6Gbone week=42Gb which is pretty for pc control .Now you have savemode to decrease the space saved, it saves when mouse input.Now you can clean up the images directory. Credits to LazyCat for dll funcCan you help:-Missing some batch to convert jpeg into avi,divx or mpeg, any ideas? It can be done by external programms but not yet under command line You can volunteer to make a better version, better help and better interface, also to correct my English language mistakes If you are interested to help, please Personal Message me or post here.;----------------------------------------------------------------------------; ----------------------------------------------------------------------------;; AutoIt Version: 3.0; Language: English; Platform: Win9x / NT; Author: BasicOs, personal message at autoitscript.com(forum); dllauthor: Lazycat;; Script Keys and info:; size of captured images depend on screen, they are approximate; +!h capture one hour jpgs in dir img en imgdump subdir.(250Mb aprox); +!d capture one day jpgs in dir img en imgdump subdir. (6 Gb aprox); +!w capture one week jpgs in dir img en imgdump subdir.(42 Gb aprox); ----------------------------------------------------------------------------Global $rsal = 0, $thesecs = 3600, $mouseCoordinates[2], $secs2shot = 1, $wmovedelay = 2$mouseCoordinates[0] = 0$mouseCoordinates[1] = 0$SaveMode = 1HotKeySet("+!x", "terminate")HotKeySet("+!p", "pausecap")HotKeySet("+!h", "caphour")HotKeySet("+!d", "capday")HotKeySet("+!w", "capweek")HotKeySet("+!e", "caphelp")HotKeySet("+!r", "rubdir") ;clean directoryWhile 1 If $rsal = 0 Then main() Sleep(500)WEndExitFunc caphour() $rsal = 0 $thesecs = 3600 MsgBox(36, "Change of Period", "Changed period to " & $thesecs / 3600 & "hour", 5)EndFunc ;==>caphourFunc capday() $rsal = 0 $thesecs = 3600 * 24 MsgBox(1, "Change of Period", "Changed period to " & $thesecs / 3600 & "hour", 5)EndFunc ;==>capdayFunc capweek() $rsal = 0 MsgBox(1, "Change of Period", "Changed period to 7 days", 5) $thesecs = 3600 * 24 * 7EndFunc ;==>capweekFunc pausecap() MsgBox(1, "Stopped", "Press Period to go on", 5) $rsal = 1EndFunc ;==>pausecapFunc caphelp() MsgBox(1, "Help", "Press for max period for recycle, H for 1 hour, D for 1 day,W for 1 week" & @CR & " p for pause, r for rub all imgs in dir, x for exit, E for help")EndFunc ;==>caphelpFunc main() $totalfiles = 0 ;total files created this time , should be number of files in imgdump dir, ideas please? While 1 If not (FileExists(@ScriptDir & "\imgdump\")) Then DirCreate(@ScriptDir & "\imgdump") If $rsal = 1 Then ExitLoop If @OSTYPE = "WIN32_WINDOWS" Then $thesavedname = @ScriptDir & "\imgdump\" & StringRight(StringReplace(_DateTime(), "_", ""), 8) & ".jpg" Else $thesavedname = @ScriptDir & "\imgdump\" & _DateTime() & ".jpg" EndIf If $SaveMode And Not IsMouseMove($mouseCoordinates) Then If $wmovedelay < 1 Then ContinueLoop Else $mouseCoordinates = MouseGetPos() $wmovedelay = 10 EndIf $wmovedelay = $wmovedelay - 1 DllCall("captdll.dll", "int", "CaptureScreen", "str", $thesavedname, "int", 50) Sleep( ($secs2shot * 1000) - 3) ;dalay 3 If $totalfiles > $thesecs Then recyclefile() ; excess of files deleted Else $totalfiles = $totalfiles + 1 EndIf WEndEndFunc ;==>mainFunc _DateTime() Return @YEAR & '_' & @MON & '_' & @MDAY & '_' & @HOUR & '_' & @MIN & '_' & @SECEndFunc ;==>_DateTimeFunc terminate() ExitEndFunc ;==>terminateFunc rubdir() DirRemove(@ScriptDir & "\imgdump", 1)EndFunc ;==>rubdirFunc recyclefile() $search = FileFindFirstFile(@ScriptDir & "\imgdump\*.*") ; Check if the search was successful If $search = -1 Then ; "No files/directories matched the search pattern") Return EndIf While 1 $file = FileFindNextFile($search) If @error Then ExitLoop If $file = "." Or $file = ".." Then ContinueLoop FileDelete(@ScriptDir & "\imgdump\" & $file) ExitLoop WEnd FileClose($search)EndFunc ;==>recyclefileFunc IsMouseMove($pos0) $pos = MouseGetPos() If $pos[0] = $pos0[0] And $pos[1] = $pos0[1] Then Return 0 Return 1EndFunc ;==>IsMouseMoveI hope you enjoy working on our Screen-Capture-Logging project and thank you for helping to make this a useful programm. Edit: Tidy source. *** Fixed names 8.3 for WIN 98 (check it out please).*** New Smart MouseMoves-Save-Space-Mode***New SmartMouseMoves delays pause of shooting, 10scs after last moveTodo: * Gui for qetting rid of half of the Hotkeys and more Options: changing the default fps, SaveMode, ..... any volunteer to make Gui? * Include Iskeypress in SmartMode and change period concept into number of shots. * Make New sleep-mode, 10 minutes without mousemove,it stops logging..X_Done * when disconnected, it takes snapshots using a specipic hotkey(sort of Printscreen)- *Count number of files in images-dir in case you restart the program(now it counts only the created files at this run of the program) * Shot only one particular window when in options Edited February 20, 2005 by BasicOs Autoit.es - Foro Autoit en Español Word visitors Image Clustrmap image: - Football Spanish team - Spanish team: Casillas, Iniesta, Villa, Xavi, Puyol, Campdevilla, etc..Programando en Autoit+Html - Coding Autoit-Html - Arranca programas desde Internet - Preprocesador de Autoit a http Link to comment Share on other sites More sharing options...
Helge Posted February 16, 2005 Share Posted February 16, 2005 I can't test it, but it looks great Actually I was thinking about creating something like this for 10 minutes ago while I was walkingtowards the local chinafood-shop here. But I soon found out that the shop was closed so nowI've ordered a pizza. Anyone want a bite ? Ooh, that wasn't the topic here. Sorry For your question on a program that can compile jpg-files into movies I've been using differentprograms that can do some similar jobs, though I think they only supported bmp and tga.I searched Google and I did get some hits that looked promising.Sorry that I couldn't help.I'm wondering, how long (can't test this myself) does it take to create one singlejpg of a full 1024x768 screen ? Thanks. Link to comment Share on other sites More sharing options...
lupusbalo Posted February 17, 2005 Share Posted February 17, 2005 (edited) run on W98SE: Works but - tested yesterday's original version, surprisingly VERY sloooooowwwwww :"> (2 minutes for an image)!!! - did some monitoring and found that, we got severe problem with short file names , i suppose it has something to do with FAT32, W98SE handling of shorts names when homonyms, and possibly other stuff?? - changed original names for shortened ones, don't need to be strictly 8.3 but make sure 8.3 names are not all homonyms) see code below (just changed timestamp format) $r= int(TimerInit()/1000) $p=StringLeft("000000",8-stringlen(string($r)))&string($r) DllCall("captdll.......\SC" & $p & ".jpg",....) - also changed Sleep() to my _DeepSleep to save a litle bit of CPU (useful mainly if snapshots are taken at a several SEC interval) and it works fine!! THX to Lazycat (and you BasicOS ) EDIT> correct a mistake (sorry about that!!) <EDIT i'll go to new version Edited February 17, 2005 by lupusbalo Link to comment Share on other sites More sharing options...
gosu Posted February 17, 2005 Share Posted February 17, 2005 You could only log when the mouse position has changed or a button was pressed. Just a hint to save space. And by the way: Use Tidy for AutoIt. Your code looks horrible. [quote name='d2hacker88' date='Jan 6 2005, 05:10 PM']Can someone please help me out with autoit like gimme a link on how to use it cause i have no experience with computer languages and i'd like to make a program with autoit in order to empress my computer teacher.[right][snapback]52215[/snapback][/right][/quote] Link to comment Share on other sites More sharing options...
BasicOs Posted February 17, 2005 Author Share Posted February 17, 2005 I'm wondering, how long (can't test this myself) does it take to create one singlejpg of a full 1024x768 screen ? Thanks.it depends greatly of your hardware, e.g.with last ata disks and enough mem, almost nothing.slower pcs some milliseconds..Win 98SE :did some monitoring and found that, we got severe problem with short file namesfixed: WIN98 changed original names for shortened onesYou could only log when the mouse position has changed or a button was pressed. Just a hint to save space.Fixed Tidy A problem is when there is some programm working you want to check without user input, (e.g.servers).With the new ver you can control the space as it recycles.Fixed: a mouse move save-space-mode for your case, have you any func to tell when Iskeypress? also IsWheelmove? pleaseAlso someone to make a GUI for most Hotkeyset being included in only one Hotkeyset, .(also including smart-save-space-mode) .. I think too many Hotkeyset Yet.Thanks for feedbak Autoit.es - Foro Autoit en Español Word visitors Image Clustrmap image: - Football Spanish team - Spanish team: Casillas, Iniesta, Villa, Xavi, Puyol, Campdevilla, etc..Programando en Autoit+Html - Coding Autoit-Html - Arranca programas desde Internet - Preprocesador de Autoit a http Link to comment Share on other sites More sharing options...
Helge Posted February 17, 2005 Share Posted February 17, 2005 it depends greatly of your hardware, e.g.with last ata disks and enough mem, almost nothing.slower pcs some milliseconds..<{POST_SNAPBACK}>Aaah, great ! Thanks for the info BasicOs ! Link to comment Share on other sites More sharing options...
BasicOs Posted February 20, 2005 Author Share Posted February 20, 2005 Someone want to make a nice GUI?, I am not so good artist for such nice paintings....... some ideas?Todo: * Gui for qetting rid of half of the Hotkeys and more Options: changing the default fps, SaveMode, ..... any volunteer to make Gui? * Include Iskeypress in SmartMode and change period concept into number of shots. * Make New sleep-mode, 10 minutes without mousemove,it stops logging..X_Done * when disconnected, it takes snapshots using a specipic hotkey(sort of Printscreen)- *Count number of files in images-dir in case you restart the program(now it counts only the created files at this run of the program) * Shot only one particular window when in options Autoit.es - Foro Autoit en Español Word visitors Image Clustrmap image: - Football Spanish team - Spanish team: Casillas, Iniesta, Villa, Xavi, Puyol, Campdevilla, etc..Programando en Autoit+Html - Coding Autoit-Html - Arranca programas desde Internet - Preprocesador de Autoit a http Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now