Func _Screenshot($path_screen)
;~ ConsoleWrite($MakeScreen & " ")
If _Timer_GetIdleTime() > 15000 Then Return
If _IsFullScreen() > 0 Then Return
Local $s_Dir = $path_screen & '\', $s_FileName, $f_Cursor = True
If Not FileExists($s_Dir) Then DirCreate($s_Dir)
$s_FileName = StringFormat('%s_%s_%s [%s_%s].jpg', @HOUR, @MIN, @SEC, @MDAY, @MON)
ConsoleWrite($s_FileName & @LF)
_ScreenCapture_SetJPGQuality(75)
_ScreenCapture_Capture($s_Dir & $s_FileName, 0, 0, @DesktopWidth, @DesktopHeight, $f_Cursor)
EndFunc ;==>_Screen
Func _IsFullScreen()
Local $hWnd = DllCall('user32.dll', 'hwnd', 'GetForegroundWindow')
If (@error) Or ($hWnd[0] = 0) Then
Return SetError(1, 0, 0)
EndIf
If (StringInStr(WinGetClassList($hWnd[0]), 'SHELLDLL_DefView') = 0) And (BitAND(WinGetState($hWnd[0]), 2) = 2) And (_WinAPI_GetClientWidth($hWnd[0]) = @DesktopWidth) And (_WinAPI_GetClientHeight($hWnd[0]) = @DesktopHeight) Then
Return 1
EndIf
EndFunc