Jump to content
Sign in to follow this  
krzyrice

Taking constant screenshots?

Recommended Posts

krzyrice

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 by krzyrice

Share this post


Link to post
Share on other sites
JRowe

#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 :)

Share this post


Link to post
Share on other sites
krzyrice

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?

Share this post


Link to post
Share on other sites
JRowe

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.)

Share this post


Link to post
Share on other sites
SxyfrG

#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

Share this post


Link to post
Share on other sites
krzyrice

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!

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.