Basics of AppleScript

Conditions & Records

Relation Operators for Records

Serial No AppleScript
1 contains
2 is equal to

Script [10.4.1]:

set studentData to {myName:"Nayan", myAge:20}
if myName of studentData is equal to "Nayan" then
    display dialog "Success"
end if

Explanation: Now its time to use if...else condition on Records. I have created a record named studentData. And in if condition I am checking if the property myName is equal to “Nayan”.

This condition holds true and hence if section will get executed.

Figure 10.4.1

Figure 10.4.1 Records (if...else)