#include <WinAPI.au3>
#include <WindowsConstants.au3>
HotKeySet("{F1}", "Pause")
HotKeySet("{F2}", "Quit")
Global $draw = True
$Frame = GUICreate("", @DesktopWidth, @DesktopHeight, 0, 0, $WS_POPUP, BitOR($WS_EX_TOPMOST, $WS_EX_TOOLWINDOW, $WS_EX_TRANSPARENT, $WS_EX_LAYERED))
GUISetBkColor(0xFFFFE1)
_WinAPI_SetLayeredWindowAttributes($Frame, 0xFFFFE1, 0, $LWA_COLORKEY)
GUISetState()
Global $hDC = _WinAPI_GetWindowDC($Frame)
Global $hPen = _WinAPI_CreatePen(0, 1, 0xFF0000)
Global $obj_orig = _WinAPI_SelectObject($hDC, $hPen)
Do
If $draw Then
WinSetOnTop($Frame, "", 1)
_WinAPI_DrawLine($hDC, 0, @DesktopHeight / 2, @DesktopWidth, @DesktopHeight / 2)
_WinAPI_DrawLine($hDC, @DesktopWidth / 2, 0, @DesktopWidth / 2, @DesktopHeight)
EndIf
Until Not Sleep(30)
Func Pause()
$draw = Not $draw
_WinAPI_InvalidateRect(0)
EndFunc
Func Quit()
_WinAPI_SelectObject($hDC, $obj_orig)
_WinAPI_DeleteObject($hPen)
_WinAPI_ReleaseDC($Frame, $hDC)
_WinAPI_InvalidateRect(0)
Exit
EndFunc