Wie kann ich verhindern, dass sich das Script sofort schließt?
Spoiler anzeigen
#Region ;**** Directives created by AutoIt3Wrapper_GUI ****
#AutoIt3Wrapper_UseX64=n
#AutoIt3Wrapper_Add_Constants=n
#EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****
#Include <Misc.au3>
#include <GUIConstantsEx.au3>
#include <GUIConstants.au3>
$dll = DllOpen("user32.dll")
While _IsPressed("20" , $dll)
Send("{Space}")
Sleep(8)
Send("{Space}")
Sleep(8)
WEnd
Opt("GUIOnEventMode", 1) ; Wechsle in den OnEvent Modus
$mainwindow = GUICreate("Funktionen", 250, 150)
GUISetOnEvent($GUI_EVENT_CLOSE, "CLOSEClicked")
GUICtrlCreateLabel("Press F9 to exit or close this!!!", 30, 10)
GUICtrlCreateLabel("Close this window to exit", 70, 40)
$okbutton = GUICtrlCreateButton("OK", 80, 70, 80)
GUICtrlSetOnEvent($okbutton, "OKButton")
GUISetState(@SW_SHOW)
Func OKButton()
MsgBox(0, "GUI Event", "Have fun ;)")
EndFunc
Func CLOSEClicked()
MsgBox(0, "GUI Event", "Du hast auf CLOSE geklickt! Programm wird beendet...")
Exit
EndFunc
HotKeySet("{F9}", "_close" )
[/autoit] [autoit][/autoit] [autoit]Func _close()
Exit
EndFunc
Lg