#include <GUIConstantsEx.au3>
$Flag = FileExists("C:\111.txt")
$Form1 = GUICreate("Проверка", 240, 120, -1, -1)
$Button1 = GUICtrlCreateButton("Есть", 16, 48, 80, 30)
$Button2 = GUICtrlCreateButton("Нету", 144, 48, 80, 30)
GUISetState(@SW_SHOW)
If $Flag Then
GUICtrlSetState($Button2, $GUI_DISABLE)
Else
GUICtrlSetState($Button1, $GUI_DISABLE)
EndIf
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $Button1
MsgBox(64, "Инфо", "Eсть")
Case $Button2
MsgBox(16, "Инфо", "Нету")
EndSwitch
WEnd