button --script

can you set it so that a script runs when a button is pressed?
If so how?

Model: Macbook
AppleScript: 2.2
Browser: Opera/9.25 (Macintosh; Intel Mac OS X; U; en)
Operating System: Mac OS X (10.5)

What sort of button did you want to press?

Peter B.

Like a button on a ir remote, or a game controller.