For example: display alert "Hello, world!" buttons {"Rudely decline", "Happily accept"} set theAnswer to button returned of the result if theAnswer is "Happily accept" then beep 5 else say "Piffle!" end if Whereas Apple events are a way to send messages into applications, AppleScript is a particular language designed to send Apple events.
مثلاً: display alert "Hello, world!" buttons {"Rudely decline", "Happily accept"} set theAnswer to button returned of the result if theAnswer is "Happily accept" then beep 5 else say "Piffle!" end if از آنجاییکه AppleEventها راهی برای فرستادن پیام به برنامه‌ها هستند، اپل اسکریپت یک زبان به خصوص برای فرستادن AppleEventها است.