multiline osascript

foreground on reopen (tested on 2.5b9)