forget all this:
I suck at Applescript...gotta learn it, but I don't have time now.
I need a script. that when run, opens a window. IN this window it should have 3 buttons (or something along these lines) I need these 3 buttons to say: "Start Music Server", "Stop Music Server", and "Restart Music Server".
I need, when clicked/selected/whatever:
the 1st button to do the equivalent of running the command "/usr/local/sbin/mt-daapd -y" in Terminal
the 2nd button to do the equivalent of running the command "killall mt-daapd" in terminal...
and the 3rd button to run "killall mt-daapd; /usr/local/sbin/mt-daapd -y"
can someone help me?! this can also be done using automator and applescript...but IDK how to do either.
:EDIT:
ok...new problem...figured out the script i need to run...i just need one more thing...
Heres what I need to know how to do...(yes, i googled):
I need to restart the script...from the top...to "Rerun" it, until the Button "Close" is clicked instead of "Rerun"
I got one idea, i just dunno how to impliment it:
Copy the entire script, including this part I need, and make a new script file out of it. Then somehow run this saved script at the end of the first script (which is going in an automator action)
the other idea is, if possible...is to just restart the script from the top...
is this possible?
I suck at Applescript...gotta learn it, but I don't have time now.
I need a script. that when run, opens a window. IN this window it should have 3 buttons (or something along these lines) I need these 3 buttons to say: "Start Music Server", "Stop Music Server", and "Restart Music Server".
I need, when clicked/selected/whatever:
the 1st button to do the equivalent of running the command "/usr/local/sbin/mt-daapd -y" in Terminal
the 2nd button to do the equivalent of running the command "killall mt-daapd" in terminal...
and the 3rd button to run "killall mt-daapd; /usr/local/sbin/mt-daapd -y"
can someone help me?! this can also be done using automator and applescript...but IDK how to do either.
:EDIT:
ok...new problem...figured out the script i need to run...i just need one more thing...
Code:
if button returned of the result is "Rerun" then
NEED THE CODE HERE, SEE BELOW
end if
I need to restart the script...from the top...to "Rerun" it, until the Button "Close" is clicked instead of "Rerun"
I got one idea, i just dunno how to impliment it:
Copy the entire script, including this part I need, and make a new script file out of it. Then somehow run this saved script at the end of the first script (which is going in an automator action)
the other idea is, if possible...is to just restart the script from the top...
is this possible?