Applescript method to determine number of unread messages?

An instant messenger which can connect to AIM, GTalk, Jabber, ICQ, and more.
Post Reply
MrMunkily
Harmless
Posts: 6
Joined: Sun Apr 23, 2006 8:03 pm

Applescript method to determine number of unread messages?

Post by MrMunkily »

I'm using the "Status Screen Saver" which lets me see whether I have new messages & stuff without unlocking my machine, which is neat. It lets you add new applications to watch using applescript modules to get unread item counts. Adding Vienna RSS and even my webmail was possible, but I'm a little stuck on Adium. I can get the number of open chats like so (from the trac page on applescript):

tell application "Adium"
return count of every chat
end tell

but that only lets me know how many chats have been opened - if someone I was talking to before sends a new message, that number won't help me.
Is there any way to access the number of unread messages? i.e. the number that goes up on the dock badge?
mtimmsj
Frappa
Posts: 144
Joined: Wed Jun 08, 2005 6:55 pm
Location: Olympia, WA

Re: Applescript method to determine number of unread messages?

Post by mtimmsj »

This is not possible directly from AppleScript. I would think this would be a fairly easy thing to add if the number is already displayed in the dock. You might want to search if a trac has been opened for this functionality and if not then open one.
User avatar
zac
Cocoaforge Admin
Posts: 1518
Joined: Sun Mar 27, 2005 3:19 pm
Contact:

Re: Applescript method to determine number of unread messages?

Post by zac »

[[adium chatController] unviewedContentCount] for the objective-c end of things, so yes, AS could potentially do it if it were implemented.
DaijDjan
Harmless
Posts: 2
Joined: Wed May 28, 2008 6:31 pm

Re: Applescript method to determine number of unread messages?

Post by DaijDjan »

Using the screen saver as well and would appreciate such a feature
DaijDjan
Harmless
Posts: 2
Joined: Wed May 28, 2008 6:31 pm

Re: Applescript method to determine number of unread messages?

Post by DaijDjan »

I made a ticket in trac: http://trac.adiumx.com/ticket/9925
loganrockmore
Harmless
Posts: 1
Joined: Wed May 28, 2008 9:33 pm

Re: Applescript method to determine number of unread messages?

Post by loganrockmore »

Hey, I'm the developer of Status Screen Saver and thanks so much for taking a look at this. Adium is, by far, the most requested application to be added to the screen saver, so I'm glad to see that it should be a simple fix. Thanks!
Post Reply