View Single Post
Old 09-01-2020, 11:43 AM
bgagnon bgagnon is offline
VanDyke Technical Support
Join Date: Oct 2008
Posts: 4,548
Hi Knightmare,

You would want to use ReadString() instead of WaitForString() following sending the ping command so you actually capture the output so you can check it for the expected phrase.
crt.Screen.Send "ping" & vbcr
strResult = crt.Screen.ReadString("#")

If InStr(strResult, "100% packet loss") Then
    ' Run Command X
    ' Run Command Y
End If
If your browser supports the site command (I know Edge does), you might run that with the search term ping because I think there are a few examples of this sprinkled throughout the forums (ie: ping).

VanDyke Software
Technical Support
(505) 332-5730

Last edited by bgagnon; 09-01-2020 at 11:46 AM. Reason: Added additional info
Reply With Quote