Open Finder appDownload

tell application "Finder"
   activate
end tell

Open home folder in Finder appDownload

tell application "Finder"
   open home
end tell

Switch play/pause iTunesDownload

tell application "iTunes"
   playpause
end tell

Play next track in iTunesDownload

tell application "iTunes"
   play (next track)
end tell

Play previous track in iTunesDownload

tell application "iTunes"
   play (previous track)
end tell

Open new tab in Safari with certain addressDownload

tell application "Safari"
   activate
   tell window 1
      set current tab to make new tab with properties {URL:"http://apple.com"}
   end tell
end tell

Create new outgoing message in MailDownload

tell application "Mail"
   make new outgoing message with properties {visible:true}
   activate
end tell

Create new document in TextEditDownload

tell application "TextEdit"
   make new document
   activate
end tell

Switch Mac into sleep modeDownload

tell application "Finder"
   sleep
end tell

©2021Nikolay Kropachev