I want to make an application for people who aren’t very computer savvy, so that they can perform useful terminal commands at the click of a button. The thing is, I want the shell window to be inside my applescript studio app!
Is there a way that I can do this? Any help, large or small is most appreciated.
set shellOutput to (do shell script "your shell command that returns some text") as Unicode text
set contents of text field "textFieldName" of window "windowName" to shellOutput
on clicked theObject
if name of theObject = "scan" then
set shellOutput to (do shell script "sudo tcpdump -i en1") as Unicode text
set contents of text field "textFieldName" of window "windowName" to shellOutput
end if
end clicked
But because when you run that shell script in the terminal, it updates constantly and never ends, my app just loads forever. How can I make the little window refresh constantly just like the Terminal one does?