How To Get WiFi SSID With AppleScript
Hello all, I would like to be able to get my current WiFi SSID set as an applescript variable
MacBook Pro, OS X Mountain Lion (10.8.4)
Apple Event: May 7th at 7 am PT
Hello all, I would like to be able to get my current WiFi SSID set as an applescript variable
MacBook Pro, OS X Mountain Lion (10.8.4)
set mySSID to do shell script "/System/Library/PrivateFrameworks/Apple80211.framework/Versions/Current/Resour ces/airport -I | awk '/ SSID/ {print substr($0, index($0, $2))}'"
display dialog "SSID = " & mySSID as string
set mySSID to do shell script "/System/Library/PrivateFrameworks/Apple80211.framework/Versions/Current/Resour ces/airport -I | awk '/ SSID/ {print substr($0, index($0, $2))}'"
display dialog "SSID = " & mySSID as string
Thanks
This solved it but i just get a dialog saying "SSID = " It doesnt actually specify my SSID
Sorry, somehow it got garbled when I posted it. This should work:
set mySSID to do shell script "/System/Library/PrivateFrameworks/Apple80211.framework/Versions/Current/Resources/airport -I | awk '/ SSID/ {print substr($0, index($0, $2))}'"
This will set the variable mySSID to the current SSID.
This Works Perfectly. Thank You
How To Get WiFi SSID With AppleScript