O'Reilly logo

AppleScript® Programming for the Absolute Beginner by Jerry Lee Ford

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Project Preview: The AppleScript Number Guessing Game

This chapter’s game project is the AppleScript Number Guessing game. This game challenges the player to guess a randomly generated number in the range of 1 to 100 in as few guesses as possible. The game begins by generating a secret random number and prompting the player to guess it, as demonstrated in Figure 8.1.

Figure 8.1. To play the player must type in a number from 1 through 100.

If the player guesses the game’s secret number, she wins. Otherwise, the game displays a message that helps guide the player’s next guess. For example, Figure 8.2 shows the message displayed in the event ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required