text 选择airplay speaker.scpt

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了text 选择airplay speaker.scpt相关的知识,希望对你有一定的参考价值。

tell application "iTunes"
	set apDevices to (get every AirPlay device whose available is true)
	if apDevices is {} then display dialog "No Airplay devices available." buttons {"Cancel"}
	set apNames to (get name of every AirPlay device whose available is true)
	set selAirplayDevices to (get name of every AirPlay device whose selected is true)
	set chosenNames to choose from list apNames default items selAirplayDevices with prompt "Select Airplay device:" with multiple selections allowed
	if chosenNames is false then return
	set apChoices to {}
	repeat with i from 1 to length of apNames
		if item i of apNames is in chosenNames then set end of apChoices to item i of apDevices
	end repeat
	set current AirPlay devices to apChoices
end tell

以上是关于text 选择airplay speaker.scpt的主要内容,如果未能解决你的问题,请参考以下文章