Hallo, Weiß jemand wie ich am besten ein Button registrieren lasse
und sie wieder destroye?
Bei mir taucht nähmlich ein fehler auf:
Spoiler anzeigen
#include <GUIConstantsEx.au3>
#include <TabConstants.au3>
#include <TreeViewConstants.au3>
#include <WindowsConstants.au3>
#include <GuiButton.au3>
local $timenews = ""
Switch @Hour
case 0 to 5
$timenews = "Eine Wunderschöne Nacht"
case 6 to 11
$timenews = "Guten Morgen :)"
Case 11 to 14
$timenews = "Mittags ist immer schön"
Case 15 to 17
$timenews = "Nachmittags die perfekte zeit"
Case 18 to 21
$timenews = "Eine schönen Abend gewünscht :)"
Case Else
$timenews = "Nacht zocker du :D"
EndSwitch
func butt()
$g1setup = GUICtrlCreateButton("Setup", 205, 384, 75, 25)
GUICtrlSetColor(-1, 0xFF0000)
GUICtrlSetBkColor(-1,0x000000)
EndFunc
func butt2()
$g2setup = GUICtrlCreateButton("Setup", 245, 384, 75, 25)
GUICtrlSetColor(-1, 0xFF0000)
GUICtrlSetBkColor(-1,0x000000)
EndFunc
$tst = GUICreate("test", 655, 585, -1, -1, BitOR($WS_MAXIMIZEBOX,$WS_SYSMENU,$WS_POPUP,$WS_TABSTOP))
GUISetBkColor(0x000000)
$exit = GUICtrlCreateButton("X", 624, 0, 27, 25)
GUICtrlSetColor(-1, 0xFF0000)
GUICtrlSetBkColor(-1,0x000000)
$profile = GUICtrlCreateButton("Profile", 8, 8, 75, 25)
GUICtrlSetColor(-1, 0xFF0000)
GUICtrlSetBkColor(-1,0x000000)
$seeting = GUICtrlCreateButton("Settings", 88, 8, 75, 25)
GUICtrlSetColor(-1, 0xFF0000)
GUICtrlSetBkColor(-1,0x000000)
$client = GUICtrlCreateButton("Client", 168, 8, 75, 25)
GUICtrlSetColor(-1, 0xFF0000)
GUICtrlSetBkColor(-1,0x000000)
$l1 = GUICtrlCreateLabel($timenews, 256, 8, 330, 25)
GUICtrlSetFont(-1, 8, 800, 0, "MS Sans Serif")
GUICtrlSetColor(-1, 0xFF0000)
$info = GUICtrlCreateEdit("", 208, 413, 433, 161)
GUICtrlSetData($info,"Willkommen bei Test")
$Tab1 = GUICtrlCreateTab(8, 64, 193, 510)
GUICtrlCreateTabItem("")
$tw = GUICtrlCreateTreeView(16, 80, 177, 490)
GUICtrlSetFont(-1, 8, 800, 0, "MS Sans Serif")
GUICtrlSetColor(-1, 0xFF0000)
$games = GUICtrlCreateTreeViewItem("Spiele",$tw)
$g1 = GUICtrlCreateTreeViewItem("The Game",$games)
$setup = GUICtrlCreateTreeViewItem("Setup",$g1)
$programme = GUICtrlCreateTreeViewItem("Programme",$tw)
$p1 = GUICtrlCreateTreeViewItem("Radio",$programme)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE, $exit
Exit
Case $g1
butt()
_GUICtrlButton_Destroy($setup)
$infog1 = FileRead(@tempdir & "\zz\Launcher\info\g1.txt")
GUICtrlSetData($info,$infog1)
Case $p1
butt2()
_GUICtrlButton_Destroy($setup)
$infop1 = FileRead(@tempdir & "\zz\Launcher\info\p1.txt")
GUICtrlSetData($info,$infop1)
Case $g1setup
MsgBox(0,"test","ey")
EndSwitch
WEnd
wäre nett wenn jemand mein fehler finden würde