AppleScript to identify the current status of Network Connection?
If you have Network menu bar item/icon in top right menu bar. You can do:

tell application "System Events" to tell process "SystemUIServer"
    value of attribute "AXDescription" of menu bar items of menu bar 1
end tell


To get connection status. For example:

{"Wi-Fi, four of four bars, with WiFiNetworkName.", "Battery: Charged ", "Clock"}


Then you can parse the string/list to check if a certain word is present.