I have used some of my script, since it is easier for me to adjust my code:)
The script pick out all words from the file name, and displays a separate Growl for each. (do you want just the full file name displayed)
The Main slow down was the Display Dialog, Nothing can happen until its clicked.
I have put it after the growl one.
It May be worth using a separate Growl message for the kids instead as it still holds up the next Growl Message.
As Shown in the second Message.
Remember you can make the messages stay open longer.
Also you can lock the system Prefs.
property KeyWords : {"Hasselhoff", "westfield", "bootle", "apple", "bebo", "myspace", "hello", "honeycut", "floor", "bootle 1", "bootle 2", "bootle 25", "bootle+26", "ken woods", "phil woods", "eleanor", "anna", "keith", "adrian smith"}
property alert_message : ("Keyword Alert!:") & return & return & "Your activity has been logged. " & return & " Store Staff have been notified. "
on adding folder items to this_file after receiving added_items
repeat with i from 1 to number of items in added_items
tell application "Finder" to set this_item to words of (displayed name of (item i of added_items as alias) as string)
repeat with z from 1 to number of items in this_item
set this_item_word to item z of this_item
if this_item_word is in KeyWords then
my checkKeyword(this_item_word)
display dialog the alert_message buttons {"Close"} default button 1 with icon 1 giving up after 30
end if
end repeat
end repeat
end adding folder items to
on checkKeyword(N)
--repeat with i in KeyWords
tell application "GrowlHelperApp" of machine "eppc://shortUserName:password@LocalHostName.local"@sunPic-Standalone.local"
set appName to "KEY WORD ALERT "
set notificationName to "KEY WORD ALERT "
set notifs to {notificationName}
set MacName to computer name of (system info)
register as application appName all notifications notifs default notifications notifs
notify with name notificationName title ("KEY WORD ALERT for:" & MacName) description N application name appName
end tell
--end repeat
end checkKeyword
property KeyWords : {"Hasselhoff", "westfield", "bootle", "apple", "bebo", "myspace", "hello", "honeycut", "floor", "bootle 1", "bootle 2", "bootle 25", "bootle+26", "ken woods", "phil woods", "eleanor", "anna", "keith", "adrian smith"}
property alert_message : ("Keyword Alert!:") & return & return & "Your activity has been logged. " & return & " Store Staff have been notified. "
on adding folder items to this_file after receiving added_items
repeat with i from 1 to number of items in added_items
tell application "Finder" to set this_item to words of (displayed name of (item i of added_items as alias) as string)
repeat with z from 1 to number of items in this_item
set this_item_word to item z of this_item
if this_item_word is in KeyWords then
my checkKeyword(this_item_word, alert_message)
end if
end repeat
end repeat
end adding folder items to
on checkKeyword(N, alert_message)
--repeat with i in KeyWords
tell application "GrowlHelperApp" of machine "eppc://shortUserName:password@LocalHostName.local"@sunPic-Standalone.local"
set appName to "KEY WORD ALERT "
set notificationName to "KEY WORD ALERT "
set notifs to {notificationName}
set MacName to computer name of (system info)
register as application appName all notifications notifs default notifications notifs
notify with name notificationName title ("KEY WORD ALERT for:" & MacName) description N application name appName
end tell
tell application "GrowlHelperApp"
set appName to "KEY WORD ALERT "
set notificationName to "KEY WORD ALERT "
set notifs to {notificationName}
set MacName to computer name of (system info)
register as application appName all notifications notifs default notifications notifs
notify with name notificationName title ("KEY WORD ALERT!") description alert_message application name appName
end tell
--end repeat
end checkKeyword