我在 XCode 中有一个 Cocoa-AppleScript 项目,我正在尝试向本地网络计算机上的 iTunes 发送一些命令。由于某种原因,这有效:
tell application "iTunes" of machine "eppc://user:pass@computer.local"
playpause
end tell
但这并不:
set remoteMachine to "eppc://user:pass@computer.local"
tell application "iTunes" of machine remoteMachine
playpause
end tell
我收到错误“找不到远程计算机”。有什么想法吗?
最佳答案
好吧,我找到了,或者至少找到了一种方法。您可以在远程计算机上指定应用程序本身,例如:
set theRemoteApp to application "eppc://user:pass@computer.local/iTunes"
using terms from application "iTunes"
tell theRemoteApp
playpause
end tell
end using terms from
关于cocoa - 远程计算机上带有 iTunes 的 AppleScript,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7905329/