-Anubi- |
|
| #include <guiconstantsex.au3> #include <staticconstants.au3> #include <windowsconstants.au3>
$ip = InputBox ( "Wrote ip addressss", "IN", @IPAddress1 ) $ping = ping ( $ip )
if @error Then If @error = 1 Then MsgBox ( 0, "Offline", "PC offline" ) If @error = 2 Then MsgBox ( 0, "Offline", "PC unreachable" ) If @error = 3 Then MsgBox ( 0, "Offline", "Bad destination" ) If @error = 4 Then MsgBox ( 0, "Offline", "Unknow error" ) EndIf
$Form1 = GUICreate("PCMode", 372, 190, 192, 158) $Pic1 = GUICtrlCreatePic("pc2.jpg", 8, 8, 169, 161, BitOR($SS_NOTIFY,$WS_GROUP,$WS_CLIPSIBLINGS)) $Conected = GUICtrlCreateLabel("On line", 192, 16, 50, 17) GUISetState(@SW_SHOW)
While 1 Sleep ( 100 ) $ping = ping ( $ip )
if NOT @error Then GUICtrlSetImage ( $Pic1, "pc.jpg" ) if @error = 1 Then GUICtrlSetImage ( $Pic1, "pc2.jpg" ) if @error = 1 Then GUICtrlSetData ( $Conected, "Off line" ) if @error = 1 Then TrayTip ( "Off line", "PC Offline", 5, 2 )
$nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit
EndSwitch WEnd Verifica se un pc è on line, da quanto tempo Anubi non posta in uqesta sezione xD
|
| |