Skip to content

Commit 2a1eec8

Browse files
committed
Add Run AppleScript Commands Inline In The Terminal as a Mac til
1 parent 675ecdc commit 2a1eec8

File tree

2 files changed

+18
-1
lines changed

2 files changed

+18
-1
lines changed

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ smart people at [Hashrocket](http://hashrocket.com/).
1010
For a steady stream of TILs from a variety of rocketeers, checkout
1111
[til.hashrocket.com](https://til.hashrocket.com/).
1212

13-
_766 TILs and counting..._
13+
_767 TILs and counting..._
1414

1515
---
1616

@@ -328,6 +328,7 @@ _766 TILs and counting..._
328328
- [Require Additional JS Libraries In Postman](mac/require-additional-js-libraries-in-postman.md)
329329
- [Resizing Both Corners Of A Window](mac/resizing-both-corners-of-a-window.md)
330330
- [Run A Hardware Check](mac/run-a-hardware-check.md)
331+
- [Run AppleScript Commands Inline In The Terminal](mac/run-applescript-commands-inline-in-the-terminal.md)
331332
- [Set A Window To Its Default Zoom Level](mac/set-a-window-to-its-default-zoom-level.md)
332333
- [View All Windows Of The Current App](mac/view-all-windows-of-the-current-app.md)
333334

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# Run AppleScript Commands Inline In The Terminal
2+
3+
[AppleScript](https://developer.apple.com/library/archive/documentation/AppleScript/Conceptual/AppleScriptLangGuide/introduction/ASLR_intro.html)
4+
is often invoked as a series of commands from a file. It is also possible to
5+
execute individual commands inline in the terminal. Use the `-e` flag to
6+
specify the command.
7+
8+
For example, if you'd like to mute your Mac:
9+
10+
```bash
11+
$ osascript -e 'set volume 0'
12+
```
13+
14+
Run that and your Mac's volume will now be at zero.
15+
16+
[source](http://osxdaily.com/2016/08/19/run-applescript-command-line-macos-osascript/)

0 commit comments

Comments
 (0)