AirPlay Scripting Workaround
As previously noted, you can't do this without getting -1728 errors:
But you can do this:
tell application "iTunes"
set apDevices to (get a reference to AirPlay devices)
-- see?
log (get name of apDevices)
-- or
repeat with aDevice in apDevices
log (get aDevice's name)
end repeat
-- or
repeat with aDevice in AirPlay devices
log (get aDevice's name)
end repeat
end tell
That's if you need to do that.