example of automating preferences.app