AppleScript to identify the current status of Network Connection? What is the AppleScript to identify the current status of MacBook Pro's network connection (Yosemite 10.10.3) 


Connected via Iphone USB on/off (Hotspotting to Iphone)
Connected via WIFI ON on/off
Connected via Ethernet on/off
No Connection


I want to add this condition check into my Automator Workflow, so workflows run similar to many of the IOS Apps that have the setting "do not send files / do not download unless connected to WIFI"
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.