Project Description
This is ole-automation object captures the rectangle around the cursor or the full shot of the screen and saves them to a bitmap file.
Usage
' cmd> regsvr32.exe miceshot.dll
Set theobj = CreateObject("oleauto.screenshot")
 WScript.echo "attr( cursor, width, height ): " & vbTAB & "( " & _
    theobj.cursor & ", " & theobj.width & ", " &  theobj.height & " )"

 theobj.cursor = false
 theobj.pixelBits = 24
retval = theobj.save("screen.bmp", true)
'   if retval then it is really fullscreen
 theobj.pixelBits = 0 ' resets to screen resolution
 theobj.cursor = True
theobj.save "mice.bmp", "no"
Notes: Both object's methods is not thread-safe (load, save), IOW, One object can be shared by some threads to change the attributes with no restriction, but they should have a plan to call the methods nonconcurrently.

Last edited Apr 22, 2014 at 6:03 PM by kannoner, version 8