Created
September 18, 2014 18:03
-
-
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'"
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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