I am currently writing a script to load certain preferences dependent on my location. I have managed to use my Broadcast and static IP address to identify a particular network and get my script to compare them to see if i am at home, work, etc,
However i think the best way of getting it so it is always accurate is to use the networks BSSID, I know i can find it by option > right click on the airport icon but how can i get the information in to a script, Can i find the BSSID from the command line?
I use the below to get current IP address:
Is there something that will get the BSSID?
However i think the best way of getting it so it is always accurate is to use the networks BSSID, I know i can find it by option > right click on the airport icon but how can i get the information in to a script, Can i find the BSSID from the command line?
I use the below to get current IP address:
Code:
set ipAddr to {do shell script "ifconfig en0 | grep 'inet ' | awk '{print $2}' ", do shell script "ifconfig en1 | grep 'inet ' | awk '{print $2}'"}
Is there something that will get the BSSID?