76 Scripting Languages Customizing a program Besides letting you automate a program, scripting languages also let you customize a program, which can make the program easier. For example, you might have a spreadsheet that calculates your company’s invoices. However, to use this spreadsheet, you need to know the specific place in the spreadsheet to type new invoice information. Type this information in the wrong place, and the spreadsheet doesn’t work right. To avoid this problem, you can write a program in a scripting language that can display a window with boxes to type in new invoice information. Then the scripting language program automatically plugs that new information in the correct place in the spreadsheet every time. For even more power, a scripting language can combine automation with customization to make programs perform tasks on their own. If you use the Mac OS X operating system, you can use its built-in scripting language — AppleScript — to control your Macintosh. For example, you can write an AppleScript program that tells your computer to download files over the Internet at a specific time each day, move files from one folder to another while renaming those files in the process, or retrieve waiting e-mail messages and sort them into categories. Figure 3-7 shows an AppleScript program that can retrieve stock quotes off the Internet. Figure 3-7: AppleScript lets you customize and automate the Mac OS X operating system.