Applescript to monitor terminal changes I want to be able to check if a word appears in a terminal window running a java application and then display a notification. Any ideas?
tell application "Terminal"
    repeat 120 times -- ~ 2 minutes
        if contents of front window contains "word" then
            say "match"
            -- insert your code here
            exit repeat
        else
            delay 1
        end if
    end repeat
end tell