AppleScript
A cheatsheet by @rstacruz|Refreshed over 3 years ago.Refresh|View source on Github

Running

Running

osascript -e "..."
display notification "X" with title "Y"

Comments

Comments

-- This is a single line comment
# This is another single line comment
(*
This is
a multi
line comment
*)

Say

Say

-- default voice
say "Hi I am a Mac"
-- specified voice
say "Hi I am a Mac" using "Zarvox"

Beep

Beep

-- beep once
beep
-- beep 10 times
beep 10

Delay

Delay

-- delay for 5 seconds
delay 5