Applescript

Applescript is a programming language used to create scripts in Mac computers.

Variables

set variableName to value

Destructure a list to new variables

set newList to {100, 200, 300}
set { x, y, z } to newList # x=100, y=200, z=300
set a to item 2 of newList # a=200

Have Application Do Something

tell application "iTerm" to \# put actions here

tell application "iTerm"
  \# put actions here
end tell

Actions

Comments

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

References

  1. http://downloads.techbarrack.com/books/programming/AppleScript/website/files_&_folders/opening_files.html
  2. Error Messages

Last modified: 202107020557