$script and $scriptline are your friends.