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

Performing Different Comparison Operations

Up to this point, all of the comparison operations that you have seen in this chapter have used the equals (=) operator to determine whether two values were equal. AppleScript provides programmers with a range of relational operators that allow you to test for different types of value relationships. For example, you can use the > operator to check and see whether one value is greater than another value and the < operator to see if one value is less than another value. Table 4.1 provides you with a list of these relational operators supported by AppleScript.

Table 4.1. Relational Operators
OperatorEnglish Equivalent
=equals
 is
 is equal to
is not
 is not equal to
>is greater than
<is less than
is greater than ...

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