Folder actions
Folder actions occur when a change happens to a folder. The folder action can be used to automatically run a script. You can use the shortcut menu to insert a prewritten folder action into your script.
To reduce the amount of time spent typing and fixing errors when writing a script, Script Editor lets you insert prewritten routines into your script using the shortcut menu (also know as the contextual menu.)