Bug with Growl & AppleScript?

24 views
Skip to first unread message

Jono

unread,
Feb 1, 2012, 6:50:21 AM2/1/12
to growld...@googlegroups.com
I'm making AppleScript notifications with Growl using the Sample AppleScript Notification here http://growl.info/documentation/applescript-support.php
The only things I'm changing are the application name, message, and "icon of application" parts.
Every time I run the script it will run successfully once and then after that throws up an error message:

Exception raised while processing: -
[_NSCFDictionary setObject:forKey:]: attempt to insert nil value (key: Applicationicon)

If I restart Growl and run the script again it will run and work OK once, and then show the same error message again until I restart Growl.
Is this a bug? Does this happen for anyone else?

Diggory

unread,
Feb 1, 2012, 11:08:27 AM2/1/12
to Growl Discuss
Hmm - I can't replicate that.

Does it work with this script?

tell application "System Events"
set isRunning to (count of (every process whose bundle identifier is
"com.Growl.GrowlHelperApp")) > 0
end tell

if isRunning then
tell application id "com.Growl.GrowlHelperApp"
-- Make a list of all the notification types
-- that this script will ever send:
set the allNotificationsList to ¬
{"Test Notification", "Another Test Notification"}

-- Make a list of the notifications
-- that will be enabled by default.
-- Those not enabled by default can be enabled later
-- in the 'Applications' tab of the Growl preferences.
set the enabledNotificationsList to ¬
{"Test Notification"}

-- Register our script with growl.
-- You can optionally (as here) set a default icon
-- for this script's notifications.
register as application ¬
"aaaAaardvark" all notifications allNotificationsList ¬
default notifications enabledNotificationsList ¬
icon of application "iCal"

-- Send a Notification...
notify with name ¬
"Test Notification" title ¬
"Test Notification" description ¬
"Message." application name "aaaAaardvark"

notify with name ¬
"Another Test Notification" title ¬
"Another Test Notification :) " description ¬
"Alas — you won't see me until you enable me..." application name
"aaaAaardvark"

end tell
end if




On Feb 1, 11:50 am, Jono <iconaho...@gmail.com> wrote:
> I'm making AppleScript notifications with Growl using the Sample
> AppleScript Notification
> herehttp://growl.info/documentation/applescript-support.php

Jono

unread,
Feb 2, 2012, 7:16:24 AM2/2/12
to growld...@googlegroups.com
When I ran it, it worked OK for a while. 

I ran another of my scripts (below) and got the problem again, then ran yours again and got the same error as before. Restarted Growl and it worked again.
Seems strange.


tell application "System Events"

set isRunning to (count of (every process whose bundle identifier is "com.Growl.GrowlHelperApp")) > 0

end tell


if isRunning then

tell application id "com.Growl.GrowlHelperApp"

-- Make a list of all the notification types 

-- that this script will ever send:

set the allNotificationsList to ¬

{"Plex Media Server Restarted"}

-- Make a list of the notifications 

-- that will be enabled by default.      

-- Those not enabled by default can be enabled later 

-- in the 'Applications' tab of the growl prefpane.

set the enabledNotificationsList to ¬

{"Plex Media Server Restarted"}

-- Register our script with growl.

-- You can optionally (as here) set a default icon 

-- for this script's notifications.

register as application ¬

"Plex Media Server Script" all notifications allNotificationsList ¬

default notifications enabledNotificationsList ¬

icon of application "Plex Media Server"

--       Send a Notification...

notify with name ¬

"Plex Media Server Restarted" title ¬

"Plex Media Server Restarted" description ¬

"" application name "Plex Media Server Script"

end tell

end if

Diggory

unread,
Feb 2, 2012, 9:55:34 AM2/2/12
to Growl Discuss
Hmmm - your script works for me. Sorry I can't reproduce your bug.

Jono

unread,
Feb 2, 2012, 12:34:57 PM2/2/12
to growld...@googlegroups.com
So it's just at my end? Strange.

Thanks anyway for taking a look.
Reply all
Reply to author
Forward
0 new messages