Sean wrote:
I know that there already exist script(s) of the kind. Then, why another one?
It'll also capture the transparent windows and/or the mouse cursor, according to the options.
Please read the comments in the script for the details.
PS. It REQUIREs GdiPlus.dll.
DOWNLOAD ScreenCapture.ahk.
hello!
congratulation for script!
i try to launch in windows 2000 and it doesnt't work.
why?
this is the "log"
Script lines most recently executed (oldest first). Press [F5] to refresh. The seconds elapsed between a line and the one after it is in parentheses to the right (if not 0). The bottommost line's elapsed time is the number of seconds since it executed.
023: CaptureScreen()
028: if !aRect
029: {
030: SysGet,Mon,Monitor,1
031: nL := MonLeft
032: nT := MonTop
033: nW := MonRight - MonLeft
034: nH := MonBottom - MonTop
035: }
060: hDC := DllCall("GetDC", "Uint", 0)
061: mDC := DllCall("CreateCompatibleDC", "Uint", hDC)
062: hBM := DllCall("CreateCompatibleBitmap", "Uint", hDC, "int", nW, "int", nH)
063: oBM := DllCall("SelectObject", "Uint", mDC, "Uint", hBM)
064: DllCall("BitBlt", "Uint", mDC, "int", 0, "int", 0, "int", nW, "int", nH, "Uint", hDC, "int", nL, "int", nT, "Uint", 0x40000000 | 0x00CC0020)
065: if bCursor
067: DllCall("SelectObject", "Uint", mDC, "Uint", oBM)
068: DllCall("DeleteDC", "Uint", mDC)
069: if znW && znH
071: if sFile = 0
073: Convert(hBM, sFile)
122: if !sFileTo
124: sFileTo := "C:" A_DD "_" A_MMM "_" A_Hour "_" A_Min ".bmp"
125: SplitPath,sFileTo,,,sExtTo
127: hGdiPlus := DllCall("LoadLibrary", "str", "gdiplus.dll")
128: VarSetCapacity(si, 16, 0), si := Chr(1)
129: DllCall("gdiplus\GdiplusStartup", "UintP", pToken, "Uint", &si, "Uint", 0)
130: DllCall("gdiplus\GdipGetImageEncodersSize", "UintP", nCount, "UintP", nSize)
131: VarSetCapacity(ci, nSize)
132: DllCall("gdiplus\GdipGetImageEncoders", "Uint", nCount, "Uint", nSize, "Uint", &ci)
134: Loop,%nCount%
142: if !sFileFr
149: if sFileFr is Integer
150: DllCall("gdiplus\GdipCreateBitmapFromHBITMAP", "Uint", sFileFr, "Uint", 0, "UintP", pImage)
153: if pImage
156: DllCall("gdiplus\GdiplusShutdown" , "Uint", pToken)
157: DllCall("FreeLibrary", "Uint", hGdiPlus)
158: }
074: DllCall("DeleteObject", "Uint", hBM)
075: DllCall("ReleaseDC", "Uint", 0, "Uint", hDC)
076: }
027: {
079: {
104: {
121: {
161: {
172: {
180: { (32.77)
thanks