*##### RULES.SCPT*

*on* replace_chars(this_text, search_string, replacement_string)

*set* AppleScript's text item delimiters *to* *the* search_string

*set* *the* item_list *to* *every* *text item* *of* this_text

*set* AppleScript's text item delimiters *to* *the* replacement_string

*set* this_text *to* *the* item_list *as* *string*

*set* AppleScript's text item delimiters *to* ""

*return* this_text

*end* replace_chars


*using terms from* *application* "Growl"

*on* *evaluate notification* with notification

*ignoring* case

*set* description *to* notification's note description

*if* description *contains* "@Growl" *then*

*beep*

*set* notification's note description *to* replace_chars(description, 
"@Growl", "@GrowlMac")

*return* {notification return:notification}

*end* *if*

*end* *ignoring*

*end* *evaluate notification*

*end* *using terms from*

*
*

*
*

*##### SEND GROWL MESSAGE*

*
*

*property* allNotifications : {}


*set* varMessage *to* "@Growl"


growl("Growl-Nachricht", varMessage)


*on* growl(theTitle, theContent)

*if* allNotifications *does not* *contain* theTitle *then*

*set* allNotifications *to* allNotifications & theTitle

*end* *if*

*set* myName *to* *path to* *me* as *text*

*set* TID *to* text item delimiters

*set* text item delimiters *to* ":"

*set* myName *to* *the* *last* *text item* *of* myName

*set* text item delimiters *to* TID

*tell* *application* id "com.Growl.GrowlHelperApp"

*register* as application myName ¬

all notifications allNotifications ¬

default notifications allNotifications ¬

icon of application "AppleScript Editor"

*notify* with name theTitle ¬

title theTitle ¬

description theContent ¬

application name myName

*end* *tell*

*end* growl

-- 
You received this message because you are subscribed to the Google Groups 
"Growl Discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/growldiscuss.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to