Weiß jemand, warum das
Script
Global $hWnd_Window
#include <GUIConstantsEx.au3>
#include <GUIListBox.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=
$GUI = GUICreate("WinList", 489, 481, 192, 124)
GUICtrlCreateGroup("Titel", 8, 8, 233, 433)
$Titel = GUICtrlCreateList("", 16, 32, 217, 396)
GUICtrlSetState(-1, $GUI_DISABLE)
GUICtrlCreateGroup("", -99, -99, 1, 1)
GUICtrlCreateGroup("Handle", 248, 8, 233, 433)
$Handle = GUICtrlCreateList("", 256, 32, 217, 396)
GUICtrlCreateGroup("", -99, -99, 1, 1)
$Set = GUICtrlCreateButton("Auswählen", 8, 440, 473, 33, $WS_GROUP)
$List = WinList()
For $i = 1 To $List[0][0]
If $List[$i][0] <> "" And IsVisible($List[$i][1]) Then
GUICtrlSetData($Titel, $List[$i][0] & "|")
GUICtrlSetData($Handle, $List[$i][1] & "|")
EndIf
Next
#EndRegion ### END Koda GUI section ###
GUISetState()
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $Set
ExitLoop
EndSwitch
WEnd
$hWnd_Window = GUICtrlRead($Handle)
GUIDelete($GUI)
Opt("TrayMenuMode", 3)
Opt("WinTitleMatchMode",4)
$SH = TrayCreateItem("Hide")
$SH_S = "1"
$Exit = TrayCreateItem("Exit")
While 1
$tMsg = TrayGetMsg()
Switch $tMsg
Case $SH
If $SH_S = "1" Then
WinSetState($hWnd_Window,"",@SW_HIDE)
$SH_S = "0"
TrayItemSetText($SH,"Show")
ElseIf $SH_S = "0" Then
WinSetState($hWnd_Window,"",@SW_SHOW)
$SH_S = "1"
TrayItemSetText($SH,"Hide")
EndIf
Case $Exit
WinSetState($hWnd_Window,"",@SW_SHOW)
Exit
EndSwitch
WEnd
Func IsVisible($Handle)
If BitAND(WinGetState($Handle), 2) Then
Return 1
Else
Return 0
EndIf
EndFunc ;==>IsVisible
nicht geht ?