Brian Dunning's FileMaker Custom Functions

FMGrowl ( title, description, sticky, message )

Add Growl notification to your FileMaker solutions.

  Average rating: 4.0 (59 votes) Log in to vote

Douglas Alder   Douglas Alder
HomeBase Software
http://www.hbase.net

Share on Facebook Share on Twitter

  Sample input:
FMGrowl(title, description, sticky, message)
  Sample output:
Growl notification

  Function definition: (Copy & paste into FileMaker's Edit Custom Function window)

This custom function allows you to integrate the Growl notification system for Mac OS X with FileMaker. It is formatted as an AppleScript and activated through the Perform AppleScript script step.

Based on ideas and code from Michael Gaslowitz (http://www.gaslowitz.net/filemaker/blog/2008/07/video-growl-integration/)
Many thanks to Michael and his great blog. He did all the hard work on this, I am just simplifying it for my own use and trying to share it as he has done with his work .

His ideas are great, but did more than what I needed. My goal was a simple function that I could feed messages into. His system has two other custom functions to feed in the version of FileMaker being used (Pro or Advanced) and adds in the ability to do custom icons loaded from FileMaker into a Temp directory. He also has a script parameter feeding system to allow you to enter all the needed parameters when assigning a script to a button. This also used more custom functions. I cut out all that good stuff just to get it working simply. It is definitely worth a look at his sample file to see how this could be expanded, and because he has a script that checks for the presence of Growl.

Parameters: Are all text fields
message - the name of the floating dialog box.
title - the title of the box.
description - the text in the main message of the box.
sticky - text field that takes the values: {yes, no}. This determines if the Growl message hangs around on the screen or not.

Applescript steps involved:

--Register the script with Growl. I am using the default FileMaker Application icon. There is a Case switch in there to deal with FileMaker Pro or Advanced, as Applescript is specific about the program name.
--send a notification to Growl

 

Comments

Marc Wood   Marc Wood, Minneapolis
May 20, 2011
Here's a version that uses the command line instead of AppleScript (same params):

"/usr/local/bin/growlnotify -t " & Quote ( title ) & " -m " & Quote ( description ) & " -a " & Quote ( "FileMaker Pro" & Case ( PatternCount ( Get ( ApplicationVersion ) ; "Advanced" ) ; " Advanced" ) ) & Case ( sticky = "yes" ; " -s" )

Requires installation of:
* growlnotify (in the Extras folder of the Growl install disk image, more info here: http://growl.info/extras.php )
* FM plugin that executes shell scripts ( such as the free BaseElements plugin: http://www.goya.com.au/baseelements/plugin )

Note: Maybe it had a purpose in M. Gaslowitz's original code, but I don't see a need/use for the "message" parameter in this stripped-down version of the function, so I send it as "". What growlnotify calls the message (-m) is actually the "description" parameter.
 

Log in to post comments.

 

Note: these functions are not guaranteed or supported by BrianDunning.com. Please contact the individual developer with any questions or problems.

Under construction. Email me your wish list for improvements.