Connectivity Test (70)
A1: HTTP Get [ Server:Port:
www.google.com Path: Attributes: Cookies: Timeout:10 Mime Type:text/* Output File: Continue Task After Error:On ]
A2: If [ %HTTPR = 200 ]
A3: Flash [ Text:Connection OK Long:Off ]
A4: Else
A5: Flash [ Text:Connection Failed Long:Off ]
A6: If [ %WIFII ~ *connection* ]
A7: Flash [ Text:Resetting Wifi Long:Off ]
A8: WiFi [ Set:Toggle ]
A9: Wait [ MS:0 Seconds:5 Minutes:0 Hours:0 Days:0 ]
A10: WiFi [ Set:Toggle ]
A11: Else
A12: Flash [ Text:Resetting Mobile Data Long:Off ]
A13: Mobile Data [ Set:Toggle ]
A14: Wait [ MS:0 Seconds:5 Minutes:0 Hours:0 Days:0 ]
A15: Mobile Data [ Set:Toggle ]
A16: End If
A17: End If
A18: HTTP Get [ Server:Port:<nonexistent web site> Path: Attributes: Cookies: Timeout:10 Mime Type:text/plain Output File: Continue Task After Error:On ]
A19: If [ %HTTPR = 200 ]
A20: WiFi [ Set:Off ]
A21: Vibrate Pattern [ Pattern:0,70,300,70 ]
A22: Flash [ Text:Wifi Blocked Long:Off ]
A23: End If
The first part (A1-A17) will test for availability of
www.google.com, and toggle Wifi or Mobile Data as needed if it's not available. The remainder checks for availability of an invalid web site which, if available, would indicate that some hot spot authentication or terms of service page is being substituted for the requested page - meaning you don't really have any connectivity beyond the local Wifi network (until you either login or accept the terms of service).