Chapter 9. Internet and Network Scripting

Of all the operating systems available today, Mac OS X is by far the easiest to network. All Macs include not only a modem (for dial-up Internet access) but also an Ethernet port (for high-speed Internet access, computer-to-computer networking, or both). Today’s Mac laptops even come with a built-in AirPort card for wireless networking—and you can install such a card for less than $100 in any other Mac made in the past few years.

The point of this chapter, however, isn’t to show you how to network computers together, or even how to get connected to the Internet. If that’s what you’re interested in, switch to the Finder, choose Help Mac Help and search for networking.

What this chapter is for is to introduce you to AppleScript’s powerful control of Internet and networking programs. You’ll learn how to script Safari (Apple’s Web browser), Mail (Apple’s email program), and iChat (Apple’s instant-messaging program). And along the way, you’ll get a deeper look into AppleScript’s powerful interaction with all facets of the Web.

Note

The example scripts from this chapter can be found on the AppleScript Examples CD (see Sidebar 2.1 for instructions).

Internet Connect

If you connect to the Internet using a dial-up modem or an AirPort wireless card, Internet Connect is your best friend. Located in your Applications folder, Internet Connect lets you connect and disconnect to the Internet at will. And if you’re having connection problems, Internet Connect ...

Get AppleScript: The Missing Manual now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.