added method to return a value from an executed AppleScript