How to create an Apple Script that runs a Terminal command?

NLed picture NLed · Sep 30, 2013 · Viewed 21.5k times · Source

I want to create an apple script that opens terminal and summons this command : sudo killall coreaudiod

How is this possible?

Answer

Daij-Djan picture Daij-Djan · Sep 30, 2013

do shell script "sudo killall coreaudiod" with administrator privileges

the user gets asked for the password then