Set Status with Marco Polo changes

An instant messenger which can connect to AIM, GTalk, Jabber, ICQ, and more.
Post Reply
tofferr
Harmless
Posts: 2
Joined: Wed May 14, 2008 4:53 am

Set Status with Marco Polo changes

Post by tofferr »

I recently became aware of a program called Marco Polo: http://www.symonds.id.au/marcopolo/. It allows your Mac to identify its location and make certain changes when a location change is detected. For example, when you go to work your default printer can change.

Anyway, I wanted to try to change my Status in Adium to reflect my location - ie, Home, Work, on Verizon Card, other, etc. This feature is included for iChat, but not Adium. I figured the solution was to write an AppleScript and either save it as an Application or invoke it through a Shell script (two options for Actions in Marco Polo). Unfortunately, I have never written an AppleScript before and I couldn't figure out how to make it work. I tried many things, including this:

Code: Select all

tell application "Adium"
	set my status message to "Home"
end tell
Any ideas?

Thanks,
Chris
mtimmsj
Frappa
Posts: 144
Joined: Wed Jun 08, 2005 6:55 pm
Location: Olympia, WA

Re: Set Status with Marco Polo changes

Post by mtimmsj »

What version of Adium are you running?

AppleScript support in Adium 1.2 and later is documented here:
http://trac.adiumx.com/wiki/AppleScript_Support_1.2

In AppleScript the keyword "my" has a special meaning in that it identifies the script that is being run as the qualifier for the action. So in your example you are setting the status message of the script to "Home", since the script probably doesn't know what a status message is, this won't work. If you have a predefined status already setup whose name is "Home", you can probably use something like:

Code: Select all

tell application "Adium"
	set status of every account to the first status whose title is "Home"
end tell
Or if you do simply want to set the status message to "Home", something like this might work:

Code: Select all

tell application "Adium"
	set status message of every account to "Home"
end tell
However in this last example I'm getting an error in my private build of Adium 1.3, I'm not sure if it will work in Adium 1.2.5.
tofferr
Harmless
Posts: 2
Joined: Wed May 14, 2008 4:53 am

Re: Set Status with Marco Polo changes

Post by tofferr »

mtimmsj,

I do have predefined statuses and the first script you provided worked perfectly.

Thank you for the AppleScript documentation link. This is my first foray into AppleScript and I definitely have some learning to do - it is so different from what I am familiar with.

Thank you,
Chris
Post Reply