mirror of
https://github.com/jbranchaud/til
synced 2026-01-03 23:28:02 +00:00
Add Run AppleScript Commands Inline In The Terminal as a Mac til
This commit is contained in:
@@ -10,7 +10,7 @@ smart people at [Hashrocket](http://hashrocket.com/).
|
||||
For a steady stream of TILs from a variety of rocketeers, checkout
|
||||
[til.hashrocket.com](https://til.hashrocket.com/).
|
||||
|
||||
_766 TILs and counting..._
|
||||
_767 TILs and counting..._
|
||||
|
||||
---
|
||||
|
||||
@@ -328,6 +328,7 @@ _766 TILs and counting..._
|
||||
- [Require Additional JS Libraries In Postman](mac/require-additional-js-libraries-in-postman.md)
|
||||
- [Resizing Both Corners Of A Window](mac/resizing-both-corners-of-a-window.md)
|
||||
- [Run A Hardware Check](mac/run-a-hardware-check.md)
|
||||
- [Run AppleScript Commands Inline In The Terminal](mac/run-applescript-commands-inline-in-the-terminal.md)
|
||||
- [Set A Window To Its Default Zoom Level](mac/set-a-window-to-its-default-zoom-level.md)
|
||||
- [View All Windows Of The Current App](mac/view-all-windows-of-the-current-app.md)
|
||||
|
||||
|
||||
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