Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

Click here to return to the 'You can use Applescript' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
You can use Applescript
Authored by: bewebste on Mar 15, '01 09:38:18PM

There is a command line app named osascript that will let you execute Applescripts from the terminal. In DP4, and I think in the beta, you must specify the full path, /usr/bin/osascript in order for it to work, but this should be fixed in the final. The quick way (let's say we want to quit Internet Explorer) is:

% osascript 'tell application "Internet Explorer" to quit'

You can also pass in the name of a file with Applescript source, or an Applescript compiled using osacompile, another command line tool. You should be able to quit any Cocoa, Carbon, or Classic app (and I'm guessing Java apps, too), assuming that the app isn't frozen.

[ Reply to This | # ]
You can use Applescript
Authored by: ewilen on Aug 23, '11 06:26:05PM
Thanks so much. But I had to use osascript -e.

[ Reply to This | # ]