
Originally Posted by
FN-Greatermanchester
Thanks again for your help.
I am not a good scripter, still learning. How would i setup the rule? the laptop may be connected to a home network so it may detect a network connection still.
In that case then you need to set some rules or a flag. Get the script to check for an IP address, if it has one, get it to check for something YOU know it would be able to ping or read a file on the school network. If it pings ok or it can read the file , then the script runs, if the ping returns a null value or the file does not exist it does not run.
As you know I tend to favour AutoIT in my scripts so I would use the @IPAddress1 macro or FileExists function.
As for not being a good scripter, nor am I, never have, never will be - I just keep plugging away at it.
Just checking up on the ping function on AutoIT and they provide a very good example:
Code:
$var = Ping("www.AutoItScript.com",250)
If $var Then; also possible: If @error = 0 Then ...
Msgbox(0,"Status","Online, roundtrip was:" & $var)
Else
Msgbox(0,"Status","An error occured with number: " & @error)
EndIf