01-14-2015, 02:21 AM
For those who like the screenshot feature back in the 5.4.2.2 version paste the following code:
; search for line
_ScreenCapture_SaveImage(@ScriptDir & "\Loots\" & $Date & " at " & $Time & ".jpg", $hBitmap)
; replace with line below
_ScreenCapture_SaveImage(@ScriptDir & "\Loots\" & $Date & " at " & $Time & ".png", _Capture($HWnD, 0, 0, 860, 720), False)
;begin copy - paste it somewhere in the other functions at the end of the script
Func _Capture($hWnd, $iLeft = 0, $iTop = 0, $iRight = -1, $iBottom = -1)
If $iRight = -1 Then $iRight = _WinAPI_GetSystemMetrics($__SCREENCAPTURECONSTANT_SM_CXSCREEN)
If $iBottom = -1 Then $iBottom = _WinAPI_GetSystemMetrics($__SCREENCAPTURECONSTANT_SM_CYSCREEN)
If $iRight < $iLeft Then Return SetError(-1, 0, 0)
If $iBottom < $iTop Then Return SetError(-2, 0, 0)
Local $iW = ($iRight - $iLeft) + 1
Local $iH = ($iBottom - $iTop) + 1
Local $hDDC = _WinAPI_GetDC($hWnd)
Local $hCDC = _WinAPI_CreateCompatibleDC($hDDC)
Local $hBMP = _WinAPI_CreateCompatibleBitmap($hDDC, $iW, $iH)
_WinAPI_SelectObject($hCDC, $hBMP)
DllCall("User32.dll", "int", "PrintWindow", "hwnd", $hWnd, "hwnd", $hCDC, "int", 0)
_WinAPI_BitBlt($hCDC, 0, 0, $iW, $iH, $hDDC, $iLeft, $iTop, $__SCREENCAPTURECONSTANT_SRCCOPY)
_WinAPI_ReleaseDC($hWnd, $hDDC)
_WinAPI_DeleteDC($hCDC)
;_ScreenCapture_SaveImage(@ScriptDir&"\new.png", $hBMP, False)
Return $hBMP
EndFunc
; end copy
; search for line
_ScreenCapture_SaveImage(@ScriptDir & "\Loots\" & $Date & " at " & $Time & ".jpg", $hBitmap)
; replace with line below
_ScreenCapture_SaveImage(@ScriptDir & "\Loots\" & $Date & " at " & $Time & ".png", _Capture($HWnD, 0, 0, 860, 720), False)
;begin copy - paste it somewhere in the other functions at the end of the script
Func _Capture($hWnd, $iLeft = 0, $iTop = 0, $iRight = -1, $iBottom = -1)
If $iRight = -1 Then $iRight = _WinAPI_GetSystemMetrics($__SCREENCAPTURECONSTANT_SM_CXSCREEN)
If $iBottom = -1 Then $iBottom = _WinAPI_GetSystemMetrics($__SCREENCAPTURECONSTANT_SM_CYSCREEN)
If $iRight < $iLeft Then Return SetError(-1, 0, 0)
If $iBottom < $iTop Then Return SetError(-2, 0, 0)
Local $iW = ($iRight - $iLeft) + 1
Local $iH = ($iBottom - $iTop) + 1
Local $hDDC = _WinAPI_GetDC($hWnd)
Local $hCDC = _WinAPI_CreateCompatibleDC($hDDC)
Local $hBMP = _WinAPI_CreateCompatibleBitmap($hDDC, $iW, $iH)
_WinAPI_SelectObject($hCDC, $hBMP)
DllCall("User32.dll", "int", "PrintWindow", "hwnd", $hWnd, "hwnd", $hCDC, "int", 0)
_WinAPI_BitBlt($hCDC, 0, 0, $iW, $iH, $hDDC, $iLeft, $iTop, $__SCREENCAPTURECONSTANT_SRCCOPY)
_WinAPI_ReleaseDC($hWnd, $hDDC)
_WinAPI_DeleteDC($hCDC)
;_ScreenCapture_SaveImage(@ScriptDir&"\new.png", $hBMP, False)
Return $hBMP
EndFunc
; end copy