Excellent tool!!! It's gorgeous.
If you are looking for a way to cheat on a videogame. this is not for you.
I recommend adding alt + ctrl to the screenshoot in order to have two monitors compatibility.
Func _Clip_screenshot($file)
local $tempdata = _ClipBoard_GetData() ;save current user's clipboard
Send("{ALTDOWN}")
Send("{CTRLDOWN}")
Send("{PRINTSCREEN}")
Send("{ALTUP}")
Send("{CTRLUP}")
sleep(200)
If _ClipBoard_IsFormatAvailable($CF_BITMAP) Then
_ClipBoard_Open(0)
$hClipboardImage = _ClipBoard_GetDataEx($CF_BITMAP)
_ClipBoard_Close()
_GDIPlus_Startup()
$hBitmap = _GDIPlus_BitmapCreateFromHBITMAP($hClipboardImage)
Local $iX = _GDIPlus_ImageGetWidth($hBitmap)
Local $iY = _GDIPlus_ImageGetHeight($hBitmap)
Local $hClone = _GDIPlus_BitmapCloneArea($hBitmap, 0, 0, $iX, $iY, $GDIP_PXF24RGB) ;make sure its 24bit bmp
_GDIPlus_ImageDispose($hBitmap)
$hBitmap = $hClone
$sCLSID = _GDIPlus_EncodersGetCLSID("BMP")
_GDIPlus_ImageSaveToFileEx($hBitmap, $file, $sCLSID, 0)
_GDIPlus_BitmapDispose($hBitmap)
_GDIPlus_Shutdown()
EndIf
_ClipBoard_SetData($tempdata) ; restore user clipboard
EndFunc