So I have this program I use to watch movies on my Apple TV that runs from my Mac in Terminal and goes to the TV. Well whenever you wanna start the server up you have to run a set of commands in Terminal.
$ cd Desktop
$ cd PopcornTV
$ sudo npm install
$ sudo node atv.js
These commands start the server which my Apple TV than connects too. Is there anyway I can make a Automator Application or anything of that sort that will run these commands for me when I click a button.
Best Answer
Running it in an apple script is not that bad. you just have to run the entire script as root because sudo requires user interaction. if you do an apple script like this one:
replace then
/path/to/npm
and/path/to/node
with the output ofwhich npm
andwhich node
it will open up a dialogue and ask you for your password.