Hallo,
Hab mir da ein kleines Skript (bin Anfänger) zum Pingen geschrieben.
Geht auch soweit! bis auf die Kleinigkeit, das ich nicht mehr aus der schleife
raus komme.
Kann mir da vielleicht jemand helfen?
Spoiler anzeigen
#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
Opt("GUIOnEventMode", 1)
[/autoit] [autoit][/autoit] [autoit]GUICreate("Ping", 206, 170, -1, -1)
$Button1 = GUICtrlCreateButton("OK", 13, 114, 83, 33, $WS_GROUP)
GUICtrlSetFont(-1, 10, 400, 0, "Segoe UI")
$Button2 = GUICtrlCreateButton("Abbrechen", 109, 114, 83, 33, $WS_GROUP)
GUICtrlSetFont(-1, 10, 400, 0, "Segoe UI")
$Input1 = GUICtrlCreateInput("192.168.178.14", 40, 64, 129, 25, $SS_CENTER)
GUICtrlSetFont(-1, 10, 800, 0, "Segoe UI")
GUICtrlCreateLabel("IP oder DNS-Name Eingeben!", 13, 24, 178, 21)
GUICtrlSetFont(-1, 10, 400, 0, "Segoe UI")
GUISetState(@SW_SHOW)
GUISetOnEvent($GUI_EVENT_CLOSE, "Form1Close")
GUICtrlSetOnEvent($Button2, "Button2Click")
GUICtrlSetOnEvent($Button1, "Button1Click")
$value = GUICtrlRead($Input1)
[/autoit] [autoit][/autoit] [autoit]While 1
Sleep(100)
WEnd
Func Form1Close()
Exit
EndFunc
Func Button2Click()
Exit
EndFunc
Func Button1Click()
[/autoit] [autoit][/autoit] [autoit]While 1
Sleep(1000)
Ping($value)
;MsgBox(0,"Test",$value)
WEnd
EndFunc
[/autoit]