So ?
Spoiler anzeigen
#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <GuiIPAddress.au3>
#include <WindowsConstants.au3>
#include <Inet.au3>
#include <EditConstants.au3>
#include <StaticConstants.au3>
Global $IPAdress1
[/autoit] [autoit][/autoit] [autoit]#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Ping", 400, 270, 400, 200)
$IPAddress1 = _GUICtrlIpAddress_Create($Form1, 10, 40, 377, 35)
GUICtrlCreateGroup("IP Adresse", 7, 25, 385, 54)
_GUICtrlIpAddress_Set($IPAddress1, "127.0.0.1")
$Button1 = GUICtrlCreateButton("Ping Starten", 150, 100, 100, 30, 0)
GUICtrlSetFont(-1, 12, 200, 0, "MS Sans Serif")
$Edit = GUICtrlCreateEdit("", 10, 150, 380, 100, BitOR($ES_AUTOVSCROLL,$ES_AUTOHSCROLL,$ES_READONLY))
GUICtrlCreateGroup("", 5, 140, 390, 115)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
case $Button1
pingen()
Case $GUI_EVENT_CLOSE
Exit
EndSwitch
WEnd
Func pingen()
Local $name, $ms
$ms = ping(_GUICtrlIpAddress_Get($IPAddress1))
TCPStartup()
$name = _TCPIpToName(_GUICtrlIpAddress_Get($IPAddress1), 0)
TCPShutdown()
If $name = "" Then $name = _GUICtrlIpAddress_Get($IPAddress1)
GUICtrlSetData($Edit, GUICtrlRead($Edit) & "In " & $ms & " ms wurde '" & $name & "' erreicht." & @CRLF)
EndFunc