Hi all, I hope you can assist. I'm trying to create a macro that adds my iPad as an additional display and move and resize some windows once its added. I'd like to, using Applescript, select the iPad displayed on this screenshot:
I'm having trouble with the Applescript though. Using UI Browser from Pfiddlesoft, I was able to create the Applescript below which works, but it only works if the System Preferences Pane is already open and the Displays option has been selected. How can I get the Applescript to work regardless of the status of the System Preferences pane - ie if it's closed or if it is in a different state?
tell application "System Preferences" to activate
tell application "System Events"
tell process "System Preferences"
click window "Displays"
tell pop up button "Add Display" of window "Displays"
click menu item "Jaco's iPad" of menu 1