Difference between revisions of "Osascript"

From wikieduonline
Jump to navigation Jump to search
Line 8: Line 8:
 
* <code>osascript -e 'display notification "My Notification text goes here" with title "My Title"'</code>
 
* <code>osascript -e 'display notification "My Notification text goes here" with title "My Title"'</code>
 
* <code>osascript -e 'display notification "hello world!" with title "Greeting" subtitle "More text" sound name "Submarine"'</code>
 
* <code>osascript -e 'display notification "hello world!" with title "Greeting" subtitle "More text" sound name "Submarine"'</code>
 +
* <code>osascript -e 'display notification "hello world!" with title "Greeting" subtitle "More text" [[sound name]] "default"'</code>
 +
 
* <code>osascript -e '[[beep]] 1'</code> or <code>[[tput]] bel</code> or <code>[[say]] TEST</code>
 
* <code>osascript -e '[[beep]] 1'</code> or <code>[[tput]] bel</code> or <code>[[say]] TEST</code>
  

Revision as of 09:41, 3 September 2022

osasscript execute AppleScripts and other OSA language scripts

Examples

  • 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"'
osascript --help
usage: osascript [-l language] [-e script] [-i] [-s {ehso}] [programfile] [argument ...]

Related

See also

Advertising: