• 4
name Punditsdkoslkdosdkoskdo

Terminal “osascript -e” directions:

What commands can be used with the osascript -e argument?

I know of the command osascript -e "set Volume x" where x is 0-7. Is there anything else I can use instead of set or Volume? Or some documentation you could link me to?

Use osascript. For example:

osascript -e 'tell app "Finder" to display dialog "Hello World"' 

Replacing “Finder” with whatever app you desire. Note if that app is backgrounded, the dialog will appear in the background too. To always show in the foreground, use “System Events” as the app:

osascript -e 'tell app "System Events" to display dialog "Hello World"'

Read more on Mac OS X Hints.

  • 1
Reply Report

osascript is a tool to execute AppleScript within a shell/script.

Here is Apple's introductory guide:

Additionally, you can open Script (in /Applications/Utilities if your on OS X 10.11). From the menu bar select Window > Library to browse library documentation.

  • 4
Reply Report