Hi
Habe als eins meiner ersten programm ein Ping Prog gebaut.
Relativ easy aber wayne
#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("IP/DNS Checker", 198, 91, 270, 241)
$Input1 = GUICtrlCreateInput("", 0, 32, 193, 21)
$Button1 = GUICtrlCreateButton("Ping", 0, 56, 193, 25, $WS_GROUP)
$Label1 = GUICtrlCreateLabel("Whitch DNS/IP should I ping for you?", 0, 8, 172, 17)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
case $Button1
$read01 = GUICtrlRead($Input1)
test()
EndSwitch
WEnd
func test()
$var = Ping( $read01, 250)
If $var Then; also possble: If @error = 0 Then ...
Msgbox(0,"Status","Online, time was:" & $var)
Else
Msgbox(0,"Status","An error occured with number: " & @error)
EndIf
EndFunc