Difference between revisions of "Osascript"
Jump to navigation
Jump to search
↑ https://code-maven.com/display-notification-from-the-mac-command-line
Line 2: | Line 2: | ||
<code>[[osasscript]]</code> execute [[AppleScripts]] and other [[OSA]] language scripts | <code>[[osasscript]]</code> execute [[AppleScripts]] and other [[OSA]] language scripts | ||
* https://ss64.com/osx/osascript.html | * https://ss64.com/osx/osascript.html | ||
+ | |||
+ | * <code>/usr/bin/osascript</code> | ||
+ | |||
== Examples == | == Examples == |
Revision as of 09:41, 4 February 2023
osasscript
execute AppleScripts and other OSA language scripts
/usr/bin/osascript
Examples
echo "your text "| xargs -I {} osascript -e 'display notification "{}" sound name "submarine" [1]
osascript -e 'display notification "MY TEXT"'
osascript -e 'display notification "MY TEXT" with title "MY TITLE"'
osascript -e 'display notification "My Notification text goes here" with title "My Title"'
osascript -e 'display notification "hello world!" with title "Greeting" subtitle "More text" sound name "Submarine"'
osascript -e 'display notification "hello world!" with title "Greeting" subtitle "More text" sound name "default"'
echo "your text "| xargs -I {} osascript -e 'display notification "{}" sound name "submarine" echo "your text "| xargs -I {} osascript -e 'display alert "{}"
osascript --help usage: osascript [-l language] [-e script] [-i] [-s {ehso}] [programfile] [argument ...]
display notification display alert
Related
See also
- iTerm2
tput bel
- growl
osascript, terminal-notifier
- Sound notifications:
tput bel, paplay, echo -e '\a', printf '\7'
,osascript -e 'beep 1'
,afplay, ping -a, say, ntfy.sh, bip (alias)
Advertising: