krzyrice Posted May 29, 2008 Share Posted May 29, 2008 (edited) How would I make my script take constant screenshots? This is what i got so far but it overwrites the last one and I don't want that. I'd rather have it labeled from 1 2 3 and so forth. Please help me on this. #include <ScreenCapture.au3> _ScreenCapture_SetBMPFormat(0) _ScreenCapture_Capture(@MyDocumentsDir & "\Screenshot1.bmp") Edited May 29, 2008 by krzyrice Link to comment Share on other sites More sharing options...
JRowe Posted May 29, 2008 Share Posted May 29, 2008 #include <ScreenCapture.au3> Global $NeverDie = 1 $i=0 While $NeverDie = 1 or i$ <= 1000 $i = i$ +1 _ScreenCapture_SetBMPFormat(0) _ScreenCapture_Capture(@MyDocumentsDir & "\Screenshot"& $i & ".bmp") Sleep(10); to minimize CPU overuse HotKeySet ( ("^!s") , "EndTheLoop") WEnd Func EndTheLoop() $NeverDie = 0 EndFunc Needs polishing, this should enter a loop and return bmps from Screenshot1.bmp to Screenshot1000.bmp, but it will exit on the hotkey event "CTRL+ALT+s" I think. Untested, maybe it'll go over for ya [center]However, like ninjas, cyber warriors operate in silence.AutoIt Chat Engine (+Chatbot) , Link Grammar for AutoIt , Simple Speech RecognitionArtificial Neural Networks UDF , Bayesian Networks UDF , Pattern Matching UDFTransparent PNG GUI Elements , Au3Irrlicht 2Advanced Mouse Events MonitorGrammar Database GeneratorTransitions & Tweening UDFPoker Hand Evaluator[/center] Link to comment Share on other sites More sharing options...
krzyrice Posted May 29, 2008 Author Share Posted May 29, 2008 haha thanks for the reply and help man. How could I tweak it to make unlimited screenshots until I press the hotkey or close the program? Link to comment Share on other sites More sharing options...
JRowe Posted May 29, 2008 Share Posted May 29, 2008 just remove the "or $i<1000" part to make it unlimited (although, a full screenshot bmp takes up a sizable chunk of space, running it would probably fill your HD in a few minutes.) [center]However, like ninjas, cyber warriors operate in silence.AutoIt Chat Engine (+Chatbot) , Link Grammar for AutoIt , Simple Speech RecognitionArtificial Neural Networks UDF , Bayesian Networks UDF , Pattern Matching UDFTransparent PNG GUI Elements , Au3Irrlicht 2Advanced Mouse Events MonitorGrammar Database GeneratorTransitions & Tweening UDFPoker Hand Evaluator[/center] Link to comment Share on other sites More sharing options...
SxyfrG Posted May 29, 2008 Share Posted May 29, 2008 #include <ScreenCapture.au3> HotKeySet("{ESC}", "ExitScreenie") Global $i = 1, $Ext = '.bmp' _ScreenCapture_SetBMPFormat(0) $sFile = @MyDocumentsDir & "\Screenshot" While 1 _ScreenCapture_Capture($sFile & $i & $Ext) $i += 1 Sleep(100) WEnd Func ExitScreenie() Exit EndFunc My scripts:AppLauncherTRAY - Awesome app launcher that runs from the system tray NEW VERSION! | Run Length Encoding - VERY simple compression in pure autoit | Simple Minesweeper Game - Fun little game :)My website Link to comment Share on other sites More sharing options...
krzyrice Posted May 29, 2008 Author Share Posted May 29, 2008 thank you so much SxyfrG. You've got what I needed perfectly! Also I reconsidered and changed to jpeg. Thanks for the heads up Jrowe! 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