Here is an example of AppleScript:

tell application "Foo"
    beep
end tell
	tab

Created by Maruku at 23:12 on Saturday, February 17th, 2007.