What i’m trying to do is when i receive a message from the person, this script is in their profile, it will display a Growl notification.
Heres what I have so far:
using terms from application "iChat"
on message received message for textChat
set appName to "iChat"
tell application "GrowlHelperApp"
notify with name "Message received" title "The name i want to display for that person" application name appName description message
end tell
end message received
end using terms from
I get no errors in iChat or Script Editor but it does not display the notification.
Have a look at how I use growl in this script and this script.
You will obviously see that you miss a line or two.
It seems to me that you didn’t register your event with growlHelper.app in the first place before you tried to send an notification. If my scripts are unclear I’d suggest you look into the Developer documentation at Growl’s homepage.
Thank you I saw where i missed the register line and added that in but it still wont display the notification.
using terms from application "iChat"
set appName to "iChat"
tell application "GrowlHelperApp"
try
register as application ¬
"iChat new message" all notifications allNotificationsList ¬
default notifications enabledNotificationsList ¬
icon of application "iChat.app"
notify with name "Message received" title "Julia" application name appName description message icon of application "iChat.app"
end try
end tell
end using terms from
I dont see it. I’m gonna go look over yours a few more times.
tell application "GrowlHelperApp"
try
set the allNotificationsList to ¬ -- STEP ONE set up the allNotifications list with some content.
{"Mail Notification"}
set the enabledNotificationsList to ¬ -- STEP TWO set up the enabled notifications list.
{"Mail Notification"}
register as application ¬
"Growls Mail Notification" all notifications allNotificationsList ¬
default notifications enabledNotificationsList ¬
icon of application "Mail.app"
notify with name ¬
"Mail Notification" title ¬
"Mail Notification" description ¬ -- HERE i refer to the item of the all and default notifications list.
"You got mail!" application name "Growls Mail Notification" icon of application "Mail.app"
on error the error_message number the error_number
display dialog "Error: " & the error_number & ". " & the error_message buttons {"Cancel"} default button 1
end try
end tell
I guess what I try to tell you is that you have missed to register your notifications list.
Use this as a template and fill out the neccessary parts (everything) (and change were neccessary), and I guess you will be good to go.