Executing shell commands (OS X)
Scott Rossi
scott at tactilemedia.com
Mon Jul 5 19:29:34 EDT 2004
Recently, "Kaveh Bazargan" wrote:
> I am building a stack as a front end to some shell commands which I
> normally type in Terminal. Most of the commands are "make" commands and I
> want each button to send one of these commands.
>
> This is how I am doing it now:
>
> I have a hidden field called "makeScript" with this text in:
>
> tell application "Terminal"
> try
> close window 1
> end try
> do script with command "\
> bash;
> cd ELS/els-xml;
> make viewpdf"
> end tell
>
> I need to change the make command near the end, with each button. So each
> button edits that line, and then sends the following command:
>
> do fld "makeScript" as applescript
>
> Now this looks very clumsy and it is. Is there a more elegant way of doing
> this? (I am having to close the Terminal window each time as each time a
> new Terminal window is opened. It would be nice if this didn't happen.)
What happens if you do the following in your button scripts:
set the hideConsoleWindows to true
do fld "makeScript" as applescript
Regards,
Scott Rossi
Creative Director
Tactile Media, Development & Design
-----
E: scott at tactilemedia.com
W: http://www.tactilemedia.com
More information about the use-livecode
mailing list