Here is an example of AppleScript:
tell application "Foo" beep end tell
Created by
Maruku
at 00:19 on Wednesday, January 03rd, 2007.