This put the hammer to the terminal when I was running a background process.
killall Terminal
You would need to run the automater event to run a terminal command.
Here is an applescript to do the deed.
(*
It is easier to diagnose problems with debug information. I suggest adding
log statements to your script to see what is going on. Here is an example.
Author: rccharles
For testing, run in the Script Editor.
1) Click on the Event Log tab to see the output from the log
statement
2) Click on Run
For running shell commands see:
http://developer.apple.com/mac/library/technotes/tn2002/tn2065.html
*)
on run
-- Write a message into the event log.
log " --- Starting on " & ((current date) as string) & " --- "
-- debug lines
set desktopPath to (path to desktop) as string
log "desktopPath = " & desktopPath
set toUnix to "killall Terminal"
log "toUnix is " & toUnix
try
set fromUnix to do shell script toUnix
log " fromUnix is" & fromUnix
log "Goodbye Terminal"
on error errMsg number n
log "killall complaint is " & errMsg & " with number " & n
end try
end run