<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
 
 <title>Homepage of Michael Goerz - adium</title>
 <link href="http://users.physik.fu-berlin.de/~mgoerz/feeds/tags/adium" rel="self"/>
 <link href="http://users.physik.fu-berlin.de/~mgoerz/"/>
 <updated>2013-03-14T16:35:44+01:00</updated>
 <author>
   <name>Michael Goerz</name>
   <email>goerz@physik.fu-berlin.de</email>
 </author>

 
 <entry>
   <title>Setting Adium Status Messages with Quicksilver</title>
   <link href="blog/2008/11/setting-adium-status-messages-with-quicksilver/"/>
   <updated>2008-11-09T00:00:00+01:00</updated>
   <id>blog/2008/11/setting-adium-status-messages-with-quicksilver</id>
   <content type="html">&lt;p&gt;Switching from &lt;a href=&#39;http://www.pidgin.im/&#39;&gt;Pidgin&lt;/a&gt; to &lt;a href=&#39;http://www.adiumx.com/&#39;&gt;Adium&lt;/a&gt;, one missing feature was the saved status messages for different accounts. I have an ICQ account with only German contacts, and an AIM account with only American contacts. In Pidgin, I can create and save a status message &amp;#8220;Dining Hall&amp;#8221; that will set both accounts to away and set different status messages for each of them, e.g. &amp;#8220;Mensa&amp;#8221; for the ICQ and &amp;#8220;At the dining hall&amp;#8221; for AIM. In fact, I can save such collections of status data where both the status and the status message is different for any of my IM accounts.&lt;/p&gt;

&lt;p&gt;In Adium I can only define saved statuses with a single status and a single message, and then apply any of those saved statuses to any single account or to the entirety of all my accounts.&lt;/p&gt;

&lt;p&gt;However, with AppleScript, this is easy to add. The &lt;a href=&#39;http://trac.adiumx.com/wiki/AppleScript_Support_1.2&#39;&gt;Adium&amp;#8217;s AppleScript API&lt;/a&gt; was a little hard to find, but once you have that, the rest is easy. For example, I&amp;#8217;ll create a script &lt;code&gt;AdiumDiningHall.applescript&lt;/code&gt; in &lt;code&gt;~/Library/Scripts&lt;/code&gt; with the following lines:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;#!/usr/bin/osascript
tell application &amp;quot;Adium&amp;quot; to tell the account &amp;quot;micgoe01&amp;quot; to go online
tell application &amp;quot;Adium&amp;quot; to tell the account &amp;quot;175434867&amp;quot; to go online&amp;lt;/code&amp;gt;

tell application &amp;quot;Adium&amp;quot; to tell the account &amp;quot;micgoe01&amp;quot; to go away
tell application &amp;quot;Adium&amp;quot; to tell the account &amp;quot;175434867&amp;quot; to go away

tell application &amp;quot;Adium&amp;quot; to set status message of account &amp;quot;micgoe01&amp;quot; to &amp;quot;At the dining hall&amp;quot;
tell application &amp;quot;Adium&amp;quot; to set status message of account &amp;quot;175434867&amp;quot; to &amp;quot;Mensa&amp;quot;&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;If I leave out the first part about going online, the status will only be set for accounts that are already online. I could also write a script that sets all accounts to Available:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;#!/usr/bin/osascript
tell application &amp;quot;Adium&amp;quot; to tell the account &amp;quot;michaelgoerz@gmail.com&amp;quot; to go online
tell application &amp;quot;Adium&amp;quot; to tell the account &amp;quot;175434867&amp;quot; to go online&amp;lt;/code&amp;gt;

tell application &amp;quot;Adium&amp;quot; to tell the account &amp;quot;micgoe01&amp;quot; to go available
tell application &amp;quot;Adium&amp;quot; to tell the account &amp;quot;175434867&amp;quot; to go available&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Or one that signs out of all my accounts:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;#!/usr/bin/osascript
tell application &amp;quot;Adium&amp;quot; to tell the account &amp;quot;micgoe01&amp;quot; to go offline
tell application &amp;quot;Adium&amp;quot; to tell the account &amp;quot;175434867&amp;quot; to go offline&amp;lt;/code&amp;gt;&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;The beauty of having these scripts in &lt;code&gt;~/Library/Scripts/&lt;/code&gt; is that they are available to &lt;a href=&#39;http://www.blacktree.com/&#39;&gt;QuickSilver&lt;/a&gt;. I just hit Cmd+Space, type part of my script name, hit Enter, and my predefined status is set in Adium. It doesn&amp;#8217;t get any faster than that.&lt;/p&gt;</content>
 </entry>
 
 
</feed>