简体   繁体   English

OSX更新到Yosemite后,“告诉”Spotify播放的Applescript无效

[英]Applescript to “tell” Spotify to play isn't working after OSX update to Yosemite

Previously to the Yosemite update, I used this Applescript to control my Spotify. 在Yosemite更新之前,我使用这个 Applescript来控制我的Spotify。

Everything worked as a charm when I ran /usr/bin/osascript /Users/jdrummond/SpotifyControl.scpt play/pause . 当我运行/usr/bin/osascript /Users/jdrummond/SpotifyControl.scpt play/pause时,一切都充当了魅力。

Now that I have updated my OSX to Yosemite, I keep getting this when I run the same command: 现在我已经将我的OSX更新为Yosemite,当我运行相同的命令时,我会继续这样做:

/Users/jdrummond/SpotifyControl2.scpt:1217:1222: script error: Expected end of line, etc. but found identifier. (-2741)

So I tried to create a simple Applescript to interact with Spotify: 所以我尝试创建一个简单的Applescript来与Spotify交互:

using terms from application "Spotify"
    tell application "Spotify" to play
end using terms from

But I'm also getting an error: 但我也得到一个错误:

错误

What am I doing wrong and how to interact with Spotify on Yosemite? 我做错了什么以及如何与优胜美地的Spotify互动? Anything changed? 有什么改变?

此问题已报告给Spotify,并将在桌面客户端的下一次更新中修复(我是那里的开发人员,可以验证它已被修复)。

Currently, the following simple script is working for me on OS X 10.9.5, Spotify 1.0.3.101.gbfa97dfe 目前,以下简单脚本适用于OS X 10.9.5,Spotify 1.0.3.101.gbfa97dfe

tell application "Spotify"
    playpause
end tell

I saved it as an app in other to use with my Microsoft Keyboard, so that the play/pause button launches the simple app that plays/pauses. 我将其保存为其他用于我的Microsoft键盘的应用程序,以便播放/暂停按钮启动播放/暂停的简单应用程序。

Spotify destroyed the ability to use AppleScript very recently with their latest idiotic update. Spotify最近破坏了使用AppleScript的最新愚蠢更新能力。 It's not Yosemite, it's Spotify. 它不是Yosemite,它是Spotify。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM