Made new apple script generic in which terminal process to paste the input text.