Applescript problem

The Growl forums have moved to Google Groups, this forum is read only.
Locked
ranathari
Harmless
Posts: 24
Joined: Sun Feb 18, 2007 9:09 pm

Applescript problem

Post by ranathari »

Could someone give me a hand with this Applescript?

Background: Adium's Growl notification for background messages doesn't work the way I want. I want a single notification when there's any amount of unread messages that just goes "X has typed something!". Adium displays a new notification for each message that's unread, so you can have five or six notifications on-screen for a chat with one person if they hit enter after each sentence.

I want to write an script that Adium can run when there's unread background messages that just displays one Growl notification. So far I've written this:

tell application "GrowlHelperApp"
set the allNotificationsList to {"Background message"}
set the enabledNotificationsList to {"Background message"}
register as application "Growl Adium background message" all notifications allNotificationsList default notifications enabledNotificationsList
notify with name "Background message" title "Adium" description "You have a background message" application name "Adium"
end tell

It runs fine in Script Editor and it's registered with Growl. I've set up Adium to run that script everytime there's unread background messages but I don't get a Growl notification when it runs. Where am I going wrong?
User avatar
Diggory
Growl Team
Posts: 129
Joined: Sat Dec 04, 2004 12:17 pm
Location: London

Re: Applescript problem

Post by Diggory »

disclaimer: I don't know anthing about Adium.

It sounds like the script is fine, if it runs in Script Editor. Perhaps it isn't being called by Adium. You can test this by adding a 'display dialog' command at the beginning of the script for debugging purposes. If no dialog pops up, then the script is never run. If that's the case, then it's an Adium Question rather than a Growl question.
ranathari
Harmless
Posts: 24
Joined: Sun Feb 18, 2007 9:09 pm

Re: Applescript problem

Post by ranathari »

I added:

display dialog "Is this shit working?"

and it comes up when I run the script in Script Editor but not when Adium should be running the script. I guess this is an Adium problem and not a Growl one, so I'll post this thread again in their forums.

Thanks for the help.
Locked