PC VER, Da quanto tempo ! xD

« Older   Newer »
  Share  
-Anubi-
CAT_IMG Posted on 21/4/2010, 14:05     +1   -1




SPOILER (click to view)
#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
 
Top
Gianlu-thebest
CAT_IMG Posted on 21/4/2010, 14:21     +1   -1




Devi postare le immagini! e comunque non funziona, dice che il mio pc è offline, ho scritto il mio ip preso da _GetIp()
 
Top
-Anubi-
CAT_IMG Posted on 21/4/2010, 15:04     +1   -1




Sei sicuro che il tuo pc sia acceso ?

E comunque per testare su te stesso lascia l'ip di defoult...
 
Top
-Anubi-
CAT_IMG Posted on 21/4/2010, 15:05     +1   -1




Ecco le immagini

Attached Image: pc.jpg

pc.jpg

 
Top
-Anubi-
CAT_IMG Posted on 21/4/2010, 15:06     +1   -1




Seconda:

Attached Image: pc2.jpg

pc2.jpg

 
Top
bof
CAT_IMG Posted on 21/4/2010, 15:08     +1   -1




CITAZIONE
CODICE
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

A che serve l'if @error then iniziale?
 
Top
-Anubi-
CAT_IMG Posted on 21/4/2010, 15:10     +1   -1




prima cosa vede se c'è l'errore, altrimenti non perde proprio tempo
 
Top
bof
CAT_IMG Posted on 21/4/2010, 15:17     +1   -1




Ah, scusa, e' che quando non vedo le parentesi graffe non capisco neanche una riga di codice.
 
Top
-Anubi-
CAT_IMG Posted on 21/4/2010, 15:22     +1   -1




C'era anche un endif...
 
Top
bof
CAT_IMG Posted on 21/4/2010, 15:45     +1   -1




Si', ma non mi trovo senza parentesi. :D
 
Top
ACIDBURN16
CAT_IMG Posted on 21/4/2010, 16:44     +1   -1




Bello, ma ip remoto o ip che posso prendere anche da una pagina web?
 
Top
-Anubi-
CAT_IMG Posted on 21/4/2010, 17:18     +1   -1




Remoto, pensa, verifica se un sito è on line ! xDxD
 
Top
Kurt_Black_hat 2.0
CAT_IMG Posted on 21/4/2010, 17:42     +1   -1




Mio dio! Utilissimo!
 
Top
bof
CAT_IMG Posted on 21/4/2010, 18:15     +1   -1




Alla fine non e' niente di che. Si puo' fare anche in C connettendosi all'host specificato ed outputtare se e' online od offline rispettivamente se non da' e da' errori di connessione. Nulla di che.
 
Top
-Anubi-
CAT_IMG Posted on 21/4/2010, 18:26     +1   -1




CITAZIONE
Mio dio! Utilissimo!

Grazie
 
Top
16 replies since 21/4/2010, 14:05   194 views
  Share