Hab ein kleines Problem.
Ich hab mich mal drangemacht AutoIt zu lernen und behersch die Grundlagen aus der Guide (Grundlagen I-V).
Wollt mich mal an die GUI machen.
Hab ne GUi mit Koda gesingt und wollt den Button jetzt mal Funktionen zuweisen.
Code:
#include <GUIConstants.au3>
#Region ### START Koda GUI section ### Form=
$Form2 = GUICreate("Erste GUI", 413, 299, 263, 201)
$Button1 = GUICtrlCreateButton("Ein Button", 40, 32, 81, 33, 0)
GUICtrlSetBkColor(-1, 0x99B4D1)
$Group1 = GUICtrlCreateGroup("Optionen:", 216, 16, 161, 209)
$Button2 = GUICtrlCreateButton("Editor", 240, 64, 105, 25, 0)
$Button3 = GUICtrlCreateButton("Firefox", 240, 104, 105, 25, 0)
$Button4 = GUICtrlCreateButton("Opera", 239, 146, 105, 25, 0)
GUICtrlCreateGroup("", -99, -99, 1, 1)
$Button6 = GUICtrlCreateButton("2ter Button", 42, 88, 81, 33, 0)
GUICtrlSetBkColor(-1, 0x99B4D1)
$Button7 = GUICtrlCreateButton("Exit", 40, 240, 241, 41, 0)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $Button1
_Func1 ()
Case $Button2
_Func2 ()
Case $Button6
_Func3 ()
Case $Button7
_Func4 ()
Case $Button3
_Func5 ()
Case $Button4
_Func6 ()
EndSwitch
WEnd
Func _Func1 ()
MsgBox (0, "JA :)", "Du hast meinen Button geklickt :)")
EndFunc
Func _Func2 ()
Run ("notepad.exe")
EndFunc
Func _Func3 ()
MsgBox ( 0, "You have clicked Button2", "Hay :D", 5)
EndFunc
Func _Func4 ()
Exit
EndFunc
Func _Func5 ()
Run ("firefox.exe")
EndFunc
Func _Func6 ()
Run ("opera.exe")
EndFunc
Woran liegt dies?
Ich freu mich über eure Antworten
mfg






