ఈ కంట్రోల్ను మారిస్తే, ఈ పేజీ ఆటోమేటిక్గా అప్డేట్ చేయబడుతుంది
    
Automate tasks using AppleScript and Terminal on Mac
You can use AppleScript with Terminal to save time or automate repetitive tasks. Terminal is a scriptable app that responds to AppleScript commands. These commands are described in Terminal’s AppleScript dictionary.
View Terminal’s AppleScript dictionary
- Go to the Finder  on your Mac. on your Mac.
- Open the /Applications/Utilities folder. 
- Drag the Terminal app icon  onto the Script Editor app icon onto the Script Editor app icon . .
Open Terminal’s AppleScript dictionary for me
In AppleScript, you can use the Do Shell Script command to send a UNIX shell script command to Terminal.
Run AppleScript scripts from Terminal
You can run AppleScript scripts from Terminal using the osascript command.
- Go to the Terminal app  on your Mac. on your Mac.
- Use the cd command to move into the directory that contains the script you want to run. For example: - % cd ~/Documents/YourScriptDirectory
- Enter the osascript command. For example: - % osascript YourScript.scpt