Can someone point out where I can stuck my $GUI_EVENT_CLOSE in without the GUI closing straight away ?
$filefolder = 'd:\temp'
$fileextension = '*.eml'
Global $Label = 0, $lastlabel = ""
$Gui = GUICreate("Web-DMZ Count", 200, 50)
GUISetBkColor(0xFFFF00)
GUISetState()
$Label = GUICtrlCreateLabel("Jobs: 0", 20, 20)
If $GUI_EVENT_CLOSE Then
Exit
EndIf
While 1
$FileList = _FileListToArray($filefolder, $fileextension);only list files with given extension
If $FileList <> 0 Then
If $FileList[0] <> $lastlabel Then
GUICtrlSetData($Label, "Jobs: " & $FileList[0])
$lastlabel = $FileList[0]
EndIf
Else
If $lastlabel <> 0 Then
GUICtrlSetData($Label, "Clear")
$lastlabel = 0
Else
EndIf
EndIf
WEnd