Page 1 of 1

Applescript method to determine number of unread messages?

Posted: Sun May 25, 2008 6:27 pm
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?

Re: Applescript method to determine number of unread messages?

Posted: Tue May 27, 2008 2:31 pm
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.

Re: Applescript method to determine number of unread messages?

Posted: Tue May 27, 2008 9:19 pm
by zac
[[adium chatController] unviewedContentCount] for the objective-c end of things, so yes, AS could potentially do it if it were implemented.

Re: Applescript method to determine number of unread messages?

Posted: Wed May 28, 2008 6:36 pm
by DaijDjan
Using the screen saver as well and would appreciate such a feature

Re: Applescript method to determine number of unread messages?

Posted: Wed May 28, 2008 6:58 pm
by DaijDjan
I made a ticket in trac: http://trac.adiumx.com/ticket/9925

Re: Applescript method to determine number of unread messages?

Posted: Wed May 28, 2008 9:35 pm
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!