• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Chapter 9. Basic Application Scripting > General Application Scripting

9.5. General Application Scripting

When applied correctly, application scripting extends programming into the actual semantics of a given application. The scripting terminology files created by the application developer open up internal data structures and reveal commands for third-party control. Certainly, it's more appropriate to talk about "recipients," "subjects," and "messages," rather than text 1 of data item 5 of window 2, when working with mail. Fortunately, this is possible by scripting definition files. Example 9-9 demonstrates the appropriateness of addresses and names for communicating with Apple's Mail application.

Example 9-9. Using mail terms to script the Mail application

	tell application "Mail"
		set new_msg to make new outgoing message
		tell new_msg
			set the visible of it to true
			make new to recipient at the end of every to recipient 
with properties
{address:"noone@nowhere.org", name:"Mr. Fred Noone"} set the subject to "This is a Test" set the content to "Please disregard this message" end tell end tell


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint