Hardware Reference
In-Depth Information
MacScripter.net , an extensive discussion forum where anyone (regardless of
skill level) can offer or receive help with AppleScript
• Matt Neuburg's book AppleScript: The Definitive Guide
AppleScript 1-2-3 , by Sal Soghoian and Bill Cheeseman
A Wave of Automation at Mac OS X Automation, which covers automation
features added in Mavericks (including AppleScript libraries)
Note: If you happen to know a little bit about Objective-C and Cocoa, you can use
a technology called AppleScript/Objective-C (or AppleScriptObjC), introduced in 10.7
Lion, to access Cocoa frameworks from AppleScript. You can learn more about it on
the Resources for AppleScriptObjC page, at Mac OS X Automation.
Script the Command Line with Shell Scripts
As you may know, OS X is based on Unix, and as such, there's a whole layer of functionality
most users never see. But you can access a long list of hidden files and useful tools in the
text-based world of the command line .
A command-line interface is a way of giving instructions to a computer and getting results
back. You type a command (a word or other sequence of characters) and press Return or
Enter. The computer then processes that command and displays the result (often in a list
or other chunk of text). In most cases, all your input and output remains on the screen,
scrolling up as more appears. But only one line—usually the last line of text in the window,
and usually designated by a blinking cursor—is the actual command line, the one where
commands appear when you type them.
You access the command line on a Mac using the Terminal utility (found in
/Applications/Utilities ). When you open Terminal, it runs a special program called
a shell , which interprets the commands you type and delivers the text-based output. OS X
comes with several different shells, but that detail is unimportant for our purposes.
What is important is that shells are programmable . You can put a series of shell commands
in a text file and, without any special fuss, run it as a program. Shell scripts can automate
nearly any activity you can perform on the command line. Although some scripts are
fabulously complex, running many thousands of lines, we're concerned here with simpler
tasks you can automate.
If you happen to be the sort of person who genuinely likes working in a command-line
interface, you'll probably want to have lots of scripts that simplify the process for you. But
Search WWH ::




Custom Search