Detect if Webview is connected to server from a program
  • Is there a way from a command file or other program on Windows to detect if Webview is connected to the server ?
    I have a computer at the fire hall that automatically logs in to Windows account when the system starts and a cmd file that runs to start a browser to the Webview page. 
    With a program called autohotkey , I can monitor if the Webview website is an active web page, and if not send a text message to me indicating a possible problem. 
    What I haven't figured out how to do is check to see if it actually connected to the server.  Occasionally, I will show up at the fire hall and it is stuck still connecting. Just refreshing usually solves the problem.

    We are a volunteer department , so there is not someone at the fire hall all the time to check on it .  If I could get a message that there might be a problem, then I can remotely logon and check on it.
  • Unfortunately, the only way to be sure if webview is connected or not is to look at the connection status at the bottom right of webview.

    Any other method of determining the connection status of webview would be some kind of work around like checking another program that monitors web traffic or writing a add on for chrome that can push out a notification or text message if the connection status label in webview changes.
  • I have implemented a method as follows to see if I can detect if the system is connected or not.
    Periodically run a power shell script, using autohotkey program to do a printscreen, which saves the screen as a .png file, then powershell script converts it to a .bmp file.
    Then powershell loop goes through the data and looks for the number of orange pixels and number of blue pixels. Seems that the color used is unique to connecting and connected message on the screen. If it doesn't see enough blue pixels or no blue or orange pixels, it sends an email indicating that possibly not connected.
    Then I can remotely signon and check the live screen.
    Right now I have it set to run every hour using Task Scheduler
    While not perfect, it will let me know if there is a possible problem in the connection.