gpt4 book ai didi

cocoa - 远程计算机上带有 iTunes 的 AppleScript

转载 作者:行者123 更新时间:2023-12-03 16:43:52 26 4
gpt4 key购买 nike

我在 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/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com