Try this:
Code:
processCheck()
on processCheck()
tell application "System Events" to get name of every process
if the result contains "Finder" then
beep --put your actions here
else
processCheck()
end if
end processCheck
Just replace Finder with the process you want and beep with the action you want it to run. Be careful, this script can run away sometimes.