Depending on what a script does, it could be that neither Terminal nor
any of those special apps I mentioned are even necessary. Like...
if there
are no '
echo' statements printing
crucial info for the user to read, then
no "screen" output is needed. In such cases, those shell scripts can be
put in ~/Library/Scripts [or /Library/Scripts] somewhere (i.e., any sub-
folder thereof), and run via
Script Menu. <--That link is a little outdated.
Tiger users install via: /Applications/AppleScript/AppleScript Utility.app
An extension to that would be to get the free
FastScripts Lite (or its
$15 big brother) and assign *
keyboard shortcuts* to call/run the scripts!!!
The 'Lite' version is limited to ten shortcuts (just enough to get us hooked).
If there's no text output for us to read, skip Terminal and just run "blind".
[EDIT: script messages in general wind up in console.log].
--
Here's a "poor man's" way to get a simple message (like "script done" or
something) from a background script to the GUI:
code:
# include this function in the background shell script:
function GUImessage ()
{
/usr/bin/osascript <<-HEREDOC
set appName to (info for (path to frontmost application))'s short name
tell application appName
display dialog "$1" giving up after 5 -- [optional 5 second timeout]
end tell
HEREDOC
}
# Put lines like this in the background shell script:
GUImessage "a GUI dialog from a background shell script"
And there's also the "say" command (paste in Terminal to test):
/usr/bin/say backup done $(/bin/date "+%A %H %M")