fix apple script to select device