#include <WinAPI.au3>
#include <GUIConstantsEx.au3>

_Main()

Func _Main()
    Local $hGUI, $btnFlash
    $hGUI = GUICreate("_WinAPI_FlashWindow", 300, 200)
    $btnFlash1 = GUICtrlCreateButton("Мигать на панели задач", 50, 45, 200, 30)
    $btnFlash2 = GUICtrlCreateButton("Мигать со свёрнутым окном", 50, 85, 200, 30)
    GUISetState()
    While 1
        Switch GUIGetMsg()
            Case $btnFlash1
                _WinAPI_FlashWindow($hGUI)
            Case $btnFlash2
                GUISetState(@SW_MINIMIZE)
                Sleep(500)
                _WinAPI_FlashWindow($hGUI)
                ; Sleep(2500)
                ; GUISetState(@SW_RESTORE)
            Case $GUI_EVENT_CLOSE
                Exit
        EndSwitch
    WEnd
EndFunc   ;==>_Main