1. A computer--implemented method for scripting an application program function comprising the steps of: instantiating a script interpreter, the script interpreter being responsive to a trigger event such that in response to the trigger event the script interpreter interprets scripts commands in an attached script; attaching a script to the script interpreter, the script defining a script event by which the script is triggered, the script further including script commands including a command to execute the application program function; and executing the application program to detect a trigger event and providing the script interpreter with the detected trigger event.