Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
AppleScript is a vaguely English-like programming/scripting language that allows you to manipulate applications to do things much faster than you could do them manually, and in exactly the same every time. I say “vaguely English-like,” because while AppleScript is almost English, it tends to not be English in amusing ways. For example, to display the URL of the current tab in Safari, AppleScript says:
tell application "Safari"
set theURL to URL of current tab of window 1
end tell
That’s somewhat in English, but it’s probably not how you’d ask another human being for that information. So it’s “vaguely” English-like. AppleScript is also a dynamic language. Because it manipulates applications, it relies on each application to implement AppleScript within itself. As each application does different things—and there are no hard rules to much of AppleScript—you get some interesting differences. For example, to do the exact same thing in Google Chrome that we did in Safari, the AppleScript is: