"tell application \"System Events\"¶
set isRunning to count of (every process whose name is \"GrowlHelperApp\") > 0¶
end tell¶
¶
if isRunning then¶
tell application \"GrowlHelperApp\"¶
register as application \"GrowlSampleApp\" all notifications {"& Quote ("TestNotify") & "} default notifications {"& Quote ("TestNotify") & "} icon of application \"FileMaker Pro" & Case ( PatternCount ( Get ( ApplicationVersion ) ; "Advanced" ) ; " Advanced\"" ; "\"" ) & "¶
notify with name "& Quote ("TestNotify") & " title " & Quote (GrowlSample::Title) & " description " & Quote(GrowlSample::GrowlText) & " application name \"GrowlSampleApp\""& " sticky "& Quote (GrowlSample::Sticky) &"¶
end tell¶
end if¶"
----
The first part checks if Growl is up and running. The second part registers the application, and notifies with the set parameters.
The icon it shows is the Icon of FileMaker, but it can be changed to anything you wish.
We also have to check for Get(LastError) -609 to be sure.
I attached the sample file which you can download from here. (right click- save as!)
UPDATE: A commenter (doug says:) Here is a custom function that does a similar thing:http://www.briandunning.com/cf/1064
Based on ideas and code from Michael Gaslowitz http://www.gaslowitz.net/filemaker/blog/2008/07/video-growl-integration/
Thanks for that!
Note by Adam: However that custom function needs to be modified a little bit, as it doesn't checks for the GrowlHelper app running, be sure to change that!
Here is a custom function that does a similar thing:
ReplyDeletehttp://www.briandunning.com/cf/1064
Based on ideas and code from Michael Gaslowitz http://www.gaslowitz.net/filemaker/blog/2008/07/video-growl-integration/
Thanks, I updated the post with your link!
ReplyDelete