Script example

Can someone provide a usage example of attaching a script to a file? When you view the info window of a file, there is a box to select a script. What does that mean exactly? Why would you want a script to be triggered when a file is opened? I’m very intrigued to see what others have done with this feature. Thanks.


Here’s an example:
Some of the “Scripts > Feeds > Synchronize …” scripts attach the “Mark as read” script to new items. After clicking on the items (e.g. in 3-pane view), the items are immediately marked as read.

This means that the combination of two scripts and the 3-pane view is more or less a basic but working RSS reader.