mirror of
https://github.com/jbranchaud/til
synced 2026-01-03 07:08:01 +00:00
Add Run AppleScript Commands Inline In The Terminal as a Mac til
This commit is contained in:
16
mac/run-applescript-commands-inline-in-the-terminal.md
Normal file
16
mac/run-applescript-commands-inline-in-the-terminal.md
Normal file
@@ -0,0 +1,16 @@
|
||||
# Run AppleScript Commands Inline In The Terminal
|
||||
|
||||
[AppleScript](https://developer.apple.com/library/archive/documentation/AppleScript/Conceptual/AppleScriptLangGuide/introduction/ASLR_intro.html)
|
||||
is often invoked as a series of commands from a file. It is also possible to
|
||||
execute individual commands inline in the terminal. Use the `-e` flag to
|
||||
specify the command.
|
||||
|
||||
For example, if you'd like to mute your Mac:
|
||||
|
||||
```bash
|
||||
$ osascript -e 'set volume 0'
|
||||
```
|
||||
|
||||
Run that and your Mac's volume will now be at zero.
|
||||
|
||||
[source](http://osxdaily.com/2016/08/19/run-applescript-command-line-macos-osascript/)
|
||||
Reference in New Issue
Block a user