To be more precise, how can you select a device from the 'Active devices' (from the devices pop up button) in Xcode's instruments.
Script:
tell application "Instruments"
click menu item "<Device name>" of menu 1 of menu item "Active Devices" of menu 1 of pop up button 1 of list 1 of group 1 of toolbar 1 of window "Instruments"
end tell
tell application "Instruments"
click menu item "*
end tell