#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
;Иконка для программы
#AutoIt3Wrapper_Icon=Сдесь пишем полный путь\Main.ico
;Добавление иконок в скрипт
;201
#AutoIt3Wrapper_Res_Icon_Add=Сдесь пишем полный путь\1.ico
;202
#AutoIt3Wrapper_Res_Icon_Add=Сдесь пишем полный путь\2.ico
Global $bStateIcon=not $bStateIcon
$hGui= GUICreate("", 184, 40, 193, 176)
$Icon = GUICtrlCreateIcon("", 0, 0, 0, 32, 32, BitOR($SS_NOTIFY,$WS_GROUP))
GUICtrlSetImage ($Icon, @ScriptName, 201)
$Button = GUICtrlCreateButton("Кнопка", 96, 6, 75, 25, 0)
GUISetState(@SW_SHOW)
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
case $Button
$bStateIcon= not $bStateIcon
if $bStateIcon then
GUICtrlSetImage ( $Icon, @ScriptName, 201)
else
GUICtrlSetImage ( $Icon, @ScriptName, 202)
endif
EndSwitch
WEnd