I see a lot of applications that can respond to applescript messages such as this one.
tell application "Safari"
return URL of front document as string
end tell
How can I query an application to find out what commands it will accept? Is there a tool for doing so?