-- PlazesAdium 0.1 -- Allows you to set your Adium (http://adium.sourceforge.net/) status message to your current Plazes (http://www.plazes.com/) location. -- (c) 2005 by Reinvented Inc. (www.reinvented.net) -- This work is licensed under the Creative Commons Attribution License. To view a copy of this license, visit http://creativecommons.org/licenses/by/2.5/ or send a letter to Creative Commons, 559 Nathan Abbott Way, Stanford, California 94305, USA. -- Set these to match your Plazes account set username to "username" set passwordPlain to "password" -- And away we go... -- First, use the /sbin/md5 command to calculate MD5 hash of the string PLAZES plus the password. This command should be installed by OS X (at least on Tiger) by default. try do shell script "/sbin/md5 -qs PLAZES" & passwordPlain on error errMsg number errNo error errMsg number errNo return "failed" end try set passwordMD5 to result -- Now that we've got the MD5 hash, we use Applescript's built-in XML-RPC client magic to communicate with the Plazes XML-RPC server... set PlazesData to TalktoPlazes(username, passwordMD5) -- And we grab the plazename and plazeurl; other things we *could* grab: -- username, plazestate, plazecountry, plazecity, plazelat, plazelon set plazename to plazename of PlazesData set plazeurl to plazeurl of PlazesData as text -- Set the status message in Adium tell application "Adium" set my status message to plazename end tell -- This is the actual XML-RPC call to the Plazes server: on TalktoPlazes(username, passwordMD5) tell application "http://beta.plazes.com/xmlrpc/whereami.php" return call xmlrpc {method name:"plazes.whereami", parameters:{username, passwordMD5}} end tell end TalktoPlazes