I wanted to be able to just issue commands to my computer without opening up a terminal… this allows me to send shell or applescript commands if I only need to do one. The default command is open -a ‘X11’ as I was using X11 quite often when I wrote it… but you could use it to get statistics like (uptime, or ps) or to send commands like (kill, or killall… ^_^;)
OS version:
display dialog "Yes Master?" default answer "open -a 'X11'" buttons {"Shell", "Applescript", "Cancel"} default button "Shell"
get {the text returned, the button returned} of the result
set {the command, the mode} to the result
try
if the mode is "Shell" then
do shell script (command)
else if the mode is "Applescript" then
run script command
else if the mode is "Cancel" then
quit
else
error "Unknown button pressed: " & mode
end if
on error message
display dialog message
quit
end try
display dialog result