Jump to content

Taking constant screenshots?


Recommended Posts

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
Link to comment
Share on other sites

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

Link to comment
Share on other sites

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

Link to comment
Share on other sites

#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

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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...