1. Frage wenn ich in meinem Menü Einstellungen klick soll ne 2te Gui aufgehen! Wie mach ich das?
2. Warum funktioniert die Funktion off2 nicht?!
Spoiler anzeigen
#cs
Titel: Stämme Timing Programm (1280x1024)
Autor: S. Schwaiger aka. Stuuuven
Datum: 04.03.09
-----------------------------------------
Beschreibung:
Ver. 1.01: 4Ag's getimt innerhalb 0,4sec
#ce
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
opt ("GUIOnEventMode", 1)
#Region GUI
$guiCPL = GUICreate("Stämme Timing Tool - BETA", 800, 700, -1, -1)
GUISetOnEvent($GUI_EVENT_CLOSE, "guiCPLClose")
$MonthCal1 = GUICtrlCreateMonthCal("2009/"&@MON&"/"&@MDAY, 570, 55, 170, 161)
$start = GUICtrlCreateButton (" Ag's los ", 30, 500, 150, 150)
GUICtrlSetFont ($start, 20)
GUICtrlSetOnEvent ($start, "goag")
GUISetState(@SW_SHOW, $guiCPL)
GUICtrlCreateLabel (" Ver. 1.01 ", 744, 664)
Guictrlcreatelabel (" © Stuuuven-Productions ", 6, 664)
$uhr=GUICtrlCreateLabel("--:--:--", 605, 10, 100, 40)
GUICtrlSetFont ($uhr, 20)
AdLibEnable("_clockRefresh")
;Menüs ======================================================
$Menu1 = GUICtrlCreateMenu("Projekte")
$M1_item1 = GUICtrlCreateMenuItem("Öffnen", $menu1)
$M1_item2 = GUICtrlCreateMenuItem("Speichern", $menu1)
$M1_item3 = GUICtrlCreateMenuItem("Ende", $menu1)
$Menu2 = GUICtrlCreateMenu("Optionen")
$M2_item1 = GUICtrlCreateMenuItem("Einstellungen", $menu2)
;=============================================================
;Felder ======================================================
$Group1 = GUICtrlCreateGroup(" Cleaner ", 30, 60, 90, 90)
$Group2 = GUICtrlCreateGroup(" 1 AG ", 30, 240, 90, 90)
$Group3 = GUICtrlCreateGroup(" 2 AG ", 220, 240, 90, 90)
$Group4 = GUICtrlCreateGroup(" 3 AG ", 410, 240, 90, 90)
$Group5 = GUICtrlCreateGroup(" 4 AG ", 600, 240, 90, 90)
;=============================================================
#EndRegion GUI
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $M1_item3
MsgBox(0,"a","a")
#Region Menü
Case $M1_item1
open()
Case $M1_item2
save()
case $M1_item3
off2()
Case $M2_item1
settings()
#EndRegion Menü
EndSwitch
WEnd
While (1)
Sleep (100)
WEnd
;DUMMY FUNCS==================================
Func save()
EndFunc
Func open()
EndFunc
Func settings()
GUICreate (" Einstellungen", -1, -1)
EndFunc
;================================================
Func _clockrefresh()
GUICtrlSetData($uhr,@HOUR & ":" & @MIN & ":" & @SEC)
EndFunc ;===> Uhrzeitrefresh
Func guiCPLClose()
Exit
EndFunc ;===> Close
Func goag()
GUISetState (@SW_HIDE, $guiCPL)
MouseClick ("left", 315, 414,1,0)
MouseClick ("left", 507, 414,1,0)
MouseClick ("left", 695, 414,1,0)
MouseClick ("left", 886, 414,1,0)
Sleep (1000)
GUISetState (@SW_SHOW, $guiCPL)
$close = GUICtrlCreateButton ("Schließen", 700, 600, 70, 40)
GUICtrlSetOnEvent ($close, "off")
EndFunc ;===> Ag's!
Func off()
Exit
EndFunc ;===> Close
Func off2()
Exit
EndFunc