Hello,
Is there an AppleScript way to check and see if a certain wireless network is currently visible?
Thanks,
~jason
You may try this:
set AirportName to do shell script ¬
"system_profiler SPAirPortDataType|awk -F\": \" '/Current Wireless Network/{print $2}'"
set hasAPname to "xxx" is in AirportName
this appears to work! awesome! thanks very much.
The system_profiler gives you your current AirPort settings, it doesn’t tell you anything about other AirPort networks in range, which is what the original question asked for.
For that, I’d use the airport too;
do shell script "/System/Library/PrivateFrameworks/Apple80211.framework/Versions/A/Resources/airport --scan"
and parse the output.
Camelot, you raise a good point. I hadn’t yet tested the script when out of range of the network I’m looking for. Will do that today or tomorrow when I get a chance,.