Problem ! Problem !
ich fange neuerdings (nach anraten einiger leute hier) die events der knöpfe bzw controles mit GUICtrlSetOnEvent ab.
nun stosse ich jedoch auf das problem, dass alle events die ich in einem neu erstellten fenster (GUICreate) nicht
funktionieren bzw der event/funktion wird nicht ausgelöst. mein beispiel ist leider etwas zu lang zum posten, deshalb
hier auszugsweise:
Spoiler anzeigen
Opt('GUIOnEventMode', 1)
Opt('TrayOnEventMode', 1)
Opt('TrayMenuMode', 1)
;erste form:
$Form1 = GUICreate("XY", 400, 200, 568, 419)
$Edit1 = GUICtrlCreateEdit("", 0, 65, 399, 100, BitOR($ES_AUTOHSCROLL,$ES_WANTRETURN,$WS_VSCROLL,$ES_READONLY))
GUICtrlSetData(-1, "")
$Button1 = GUICtrlCreateButton("Refresh", 8, 8, 121, 49, 0)
GUICtrlSetState($Button1, $GUI_HIDE)
$Button2 = GUICtrlCreateButton("Save/Send log", 8, 8, 121, 49, 0)
$Lable1 = GUICtrlCreateLabel("", 100, 170, 350, 35, 0)
$Lable2 = GUICtrlCreateLabel("", 100, 183, 350, 35, 0)
$Lable3 = GUICtrlCreateLabel("Status:", 10, 173, 60, 35, 0)
GUICtrlSetFont($Lable1, 8, 700)
GUICtrlSetFont($Lable2, 8, 700)
GUICtrlSetFont($Lable3, 12, 700)
$checkbox1 = GUICtrlCreateCheckbox("Debugmode", 140, 10, 150, 15, 0)
GUICtrlSetFont($checkbox1, 8, 700)
;zweite form:
Global $Form4 = GUICreate("Describe the bug ( german or english please)", 300, 300,-1, -1)
Global $Edit4 = GUICtrlCreateEdit("", 10, 10, 280, 250, 0)
Global $Button3 = GUICtrlCreateButton("Send",100, 265, 100, 30)
GUISetState(@SW_HIDE, $Form4)
GUISwitch($Form1)
GUISetOnEvent($GUI_EVENT_CLOSE, '_Exit'); geht, da aus Form1
GUISetOnEvent($GUI_EVENT_MINIMIZE, '_Minimize') ; geht, da aus Form1
GUICtrlSetOnEvent($Button2, "_save_and_send"); geht, da aus Form1
GUICtrlSetOnEvent($checkbox1, "_checkbox1"); geht, da aus Form1
GUICtrlSetOnEvent($Button3, "_sendpressed"); PROBLEM HIER ! - GEHT NICHT!!!
TraySetOnEvent( -7, '_Restore')
GUISetState(@SW_SHOW, $Form1)
[/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]Func _Minimize()
TraySetState(1)
GUISetState(@SW_HIDE)
EndFunc
Func _Restore()
TraySetState(2)
GUISetState(@SW_SHOW)
EndFunc
;PROBLEM: hier kommt er nie an bzw wird nie ausgelöst:
Func _sendpressed()
MsgBox(0,"1", $ok_was_clicked)
$enteredshit = GUICtrlRead($Edit4)
GUISetState(@SW_HIDE, $Form4)
$ok_was_clicked = 1
EndFunc
Danke im Voraus!!!