FMGrowler Function Reference

Functions

General Functions

Growl_PostNotification ( notificationName; title; text {; priority; isSticky; icon; onClick; onTimeout} )

PostNotification provides access to all options of a notification. The parameters are:

notificationName

Required. One of:

title
Required. The title for notification.
text

Required. The text of the message.

priority

The priority value may be used by Growl to alter how a notification is displayed. The value must be one of:

If a priority is not specified then Growl_NormalPriority is used.

isSticky

Boolean: the default value is FALSE.

Sticky notifications do not automatically disappear and will stay on screen until clicked. (Note: this can be overridden by the user in the Growl Preferences.)

icon

A PNG image in a container field to display for the notification. If no image is provided then the FileMaker application icon is used.

onClick

A callback object describing the action to be taken when a notification is clicked on by the user. Leave this value blank if no action is to be taken when a user clicks on the notification.

onTimeout

A callback object describing the action to be taken when a notification times out. Leave this value blank if no action is to be taken when the notification times out.

Growl_Callback ( database; scriptName {; scriptContol; parameter} )

Creates a callback object to be supplied to the Growl_PostNotification function.

Do not store the results of a call to Growl_Callback as the internal representation of the callback may change.

The parameters are:

database

Required. The name of the database containing the script to be run.

scriptName

Required. The name of the script to be run when the callback is triggered.

scriptContol

When the notification is triggered should it: Halt, Exit, Resume or Pause any script that is running? The value must be one of:

If the scriptContol is not specified then Growl_ScriptPause is used.

parameter

Text: if provided the parameter will be passed to the script.

"Convenience" Functions

In general use, where the usual scenario will be posting a simple notification, PostNotification, can be overkill so a number of functions with a simpler interface, one for each notification name, are provided.

text

Required. The text of the message.

isSticky

Boolean: the default value is FALSE.

Sticky notifications do not automatically disappear and will stay on screen until clicked. (Note: this can be overridden by the user in the Growl Preferences.)

icon

A PNG image in a container field to display for the notification. If no image is provided then the FileMaker application icon is used.

Note: the priority for the convenience functions is set to Growl_NormalPriority with the exception of Growl_DatabaseInformation and Growl_DatabaseError whch are set to Growl_ModeratePriority and Growl_HighPriority respectively.

Administrative Functions

Functions for use with AutoUpdate and to check if Growl is installed and running.

Growl_Version

Returns version number string of the plug-in, for example 1.0.2.

Growl_VersionAutoUpdate

Returns the AutoUpdate version number string for the plug-in. For example: for version 1.0.1 of the plug-in the returned value is 00010001.

Growl_IsGrowlInstalled

Removed.
This function is being removed from the Growl SDK. The function still works in FMGrowler 1.0.2 but is no longer visible in the calculation dialogs and was removed for version 1.0.3.

Returns True when Growl is installed.

Growl_IsGrowlRunning

Returns True when the Growl helper application is running.

Error Handling

Errors that occur when the plug-in is trying to register or when attempting to run a script from a "callback" are logged to the system log and can be viewed using the Console application. Growl does not, that I can see, provide a way to obtain an error when an attempt to post a notification so the plug-in function calls will always return without an error even if the notification does not succeed.

The error codes reported when an attempt to call a script from a plug-in fails are generated by FileMaker and can be looked up in the on-line help.

An error code of 10005 is returned when an invalid notification name is supplied.


Contact | FMGrowler

FileMaker is a registered trademark of FileMaker, Inc. in the U.S. and other countries.

© 2009-2013 Mark Banks. Last modified: March 25, 2013