Skip to content

Instantly share code, notes, and snippets.

@jamesgecko
Created September 18, 2014 18:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jamesgecko/9ca063535bc7261f95e9 to your computer and use it in GitHub Desktop.
Save jamesgecko/9ca063535bc7261f95e9 to your computer and use it in GitHub Desktop.
Use this script with Adium to set your status message based on what wifi network you're connected to. In Adium's Preferences, on the Events tag, edit or add the "You connect" event and add "Run the AppleScript 'change-status-from-wifi'"
set mySSID to do shell script "/System/Library/PrivateFrameworks/Apple80211.framework/Versions/Current/Resources/airport -I | awk '/ SSID/ {print substr($0, index($0, $2))}'"
if mySSID is "HomeNetwork" then
set message to "Working from home"
end if
if mySSID is "WorkNetwork" then
set message to "Working from the office"
end if
tell application "System Events"
if exists process "Adium" then tell application "Adium" to set status message of every account to message
end tell
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment