Hier erstmal Skript :
Spoiler anzeigen
#include <GuiConstantsEx.au3>
#include <EditConstants.au3>
#include <WindowsConstants.au3>
_MsgBoxEx("Test","Hallo",1,"OK|OK2")
Func _MsgBoxEx($Title,$Text,$Buttons = 1,$Buttons_Names = "OK",$Color = 0xCCCCCC)
If Not IsNumber($Buttons) Then
SetError(@error,2)
Return 0
EndIf
$GUI_MSGBOX=GUICreate($Title,($Buttons*100)+100,100)
GUISetState()
GUISetBkColor($Color)
$Buttons_Splitted=StringSplit($Buttons_Names,"|")
$PosButts=0
Dim $Buttons_Create[$Buttons_Splitted[0]+1]
For $i=1 to Ubound($Buttons_Splitted,1)-1
$Buttons_Create[$i]=GUICtrlCreateButton($Buttons_Splitted[$i],$PosButts,100-25,100)
$PosButts=$PosButts+100
Next
$Edit=GUICtrlCreateEdit($Text,0,0,($Buttons*100)+98,70,$ES_READONLY+$WS_VSCROLL)
While 1
$msg=GUIGetMsg()
Select
Case $msg=$GUI_EVENT_CLOSE
SetError(@error,1)
Return 0
For $i=1 to Ubound($Buttons_Create,1)-1
Case $msg=$Buttons_Create[$i]
GUIDelete($GUI_MSGBOX)
Return 1
Next
EndSelect
WEnd
EndFunc
Mit diesem Befehl soll man soviel Buttons in einer MsgBox erstellen können wie man will und diese auch beschriften wie man will.Doch nun stellt sich ein Problem.
Zeile 28 : (28) : ==> "Case" statement with no matching "Select"or "Switch" statement.:
Case $msg=$Buttons_Create[$i]
Hoffe ihr könnt mir helfen
mfg nof@ker