33.2 Exploring the Mail Application ObjectMail has an application scripting object that represents the Mail app itself. You can get this object's properties with an AppleScript, such as the user's email address (property user email), the software's version, and a true/false property called frontmost (representing whether or not Mail is the frontmost program on the Mac OS X desktop ). Example 33-2 gets the value of some of these properties and displays them to the user, using the display dialog scripting addition.
Example 33-2. Query the Mail Application Objecttell application "Mail" set myemail to user email set appname to name set mver to version end tell display dialog ("the user's email is: " & myemail & return & "the App name is:" & appname & (ASCII character 13) & "the App version is: " & (mver as string)) |