HELP: Generic Growl AppleScript?

How would I code the basic Growl AppleScript in order to send out a Growl alert via Hazel rules?
I don't want to set *all* my Growl alerts to my iPhone (via Howl), just for certain events (like file conversion completing).
I tried just adding a generic Growl AppleScript, but Hazel gives me an error:
I know in the Hazel help there is some extra code I need to add ("theFile" etc.) to get external scripts to work with Hazel, but not sure how to go about doing this with Growl alerts.
BY doing this, I can set just this one Hazel event to send a specific Growl alert, and then have that forwarded to my iPhone (via Howl). Otherwise I need to send *all* my Hazel Growl alerts to the iPhone, which is undesirable.
I don't want to set *all* my Growl alerts to my iPhone (via Howl), just for certain events (like file conversion completing).
I tried just adding a generic Growl AppleScript, but Hazel gives me an error:
- Code: Select all
tell application "GrowlHelperApp" -- ** the daemon that is behind the scenes
-- Make a list of all the notification types that this script will ever send:
-- ** They really mean "ever" or you'll have to reregister.
set the allNotificationsList to {"Handbrake convert complete"}
-- Make a list of the notifications that will be enabled by default.
-- ** We'll see shortly that a note must be enabled and the user can disable it.
-- Notifications not enabled by default can be enabled later in the 'Applications' tab of the growl prefpane.
set the enabledNotificationsList to {"Handbrake convert complete"} -- ** just one turned on, the other not.
-- Register our script with growl.
-- You can optionally (as here) set a default icon for this script's notifications.
-- ** Theoretically, you only have to register once, but there is absolutely no harm in doing
-- it every time the script runs, [i]i.e.[/i], leaving this line in your script.
register as application "Handbrake Encode Growler" all notifications allNotificationsList default notifications enabledNotificationsList icon of application "HandBrake"
-- Send a Notification...
-- This one will appear because it was enabled by default.
notify with name "Handbrake convert complete" title "Handbrake convert is complete" description "Handbrake has finished encoding." application name "Handbrake Encode Growler"
end tell
I know in the Hazel help there is some extra code I need to add ("theFile" etc.) to get external scripts to work with Hazel, but not sure how to go about doing this with Growl alerts.
BY doing this, I can set just this one Hazel event to send a specific Growl alert, and then have that forwarded to my iPhone (via Howl). Otherwise I need to send *all* my Hazel Growl alerts to the iPhone, which is undesirable.