2015年3月更新后,从Spotify应用获取当前曲目信息 [英] Fetch the current track info from Spotify app after March 2015 update

查看:77
本文介绍了2015年3月更新后,从Spotify应用获取当前曲目信息的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想使用自动快捷键从Spotify Windows客户端中提取当前的曲目信息.

I want to pull out the current track information from Spotify windows client using autohotkey.

尽管此问题 Spotify中下一首歌曲的热键解决了一些问题常用ahk脚本中的问题(媒体播放问题)(可以在以下问题中找到:最新的Spotify更新:Autohotkeys脚本已损坏及以下),跟踪信息快捷方式仍然无法使用.

Although this question Hotkey for next song in Spotify solved some of the problems (the media playback issues) in the commonly used ahk script (can be found in this question: Newest Spotify update: Autohotkeys script broke and below), the track info shortcut still does not work.

^Down:: 
{ 
DetectHiddenWindows, On 
SetTitleMatchMode 2 
WinGetTitle, now_playing, ahk_class SpotifyMainWindow 
;StringTrimLeft, playing, now_playing, 10 
DetectHiddenWindows, Off 
clipboard = %playing%`r`n
return 
}

无论我正在播放哪首歌,这都会给我免费Spotify".

This will give me "Spotify free" no matter what song I am playing.

主要问题在于,此更新后,托盘图标和任务栏图标停止显示当前播放的歌曲信息.现在,Windows间谍可以从任务栏图标中找到的文本是"Spotify Free".

The main problem is that the tray icon and the task bar icon stopped showing the currently played song information after this update. Only text Windows spy can find from the task bar icon is now "Spotify Free".

因此,我尝试通过遵循此问题中的示例来获取所有控制列表并提取每个文本中的文本:

So, I tried to get all controllist and extract texts in each of them by following the example in this question: How to obtain textual contents from a window

但是,我只能找到两个控件("Chrome_WidgetWin_01"和"Chrome_RenderWidgetHostHWND1"),并且Window spy可以找到文本"Chrome Legacy Window",这就是它的全部内容.

But, I could only find two controls ("Chrome_WidgetWin_01" and "Chrome_RenderWidgetHostHWND1") and Window spy can find text "Chrome Legacy Window" and this is all it finds.

是否有进一步深入研究的方法?我注意到Windows任务管理器中有3个spotify.exe实例.调查其他流程会有所帮助吗?

Is there a way to dig into this further? I noticed in the Windows Task Manager there are 3 spotify.exe instances. Would looking into other processes help?

PS AHK窗口信息1.7( http://www.autohotkey. com/board/topic/8204-ahk-window-info-17/)目前无法下载.所以我只能使用Decarlo的Ahk Window Spy 1.3.3.

PS AHK Window Info 1.7 (http://www.autohotkey.com/board/topic/8204-ahk-window-info-17/) is not available for download at moment. so i could only use Ahk Window Spy 1.3.3 by Decarlo.

哦,我在 http://www.autohotkey.com/board/topic/8204-ahk-window-info-17/page-6 但这并没有帮助.找到的信息不超过Ahk Window Spy.

Oh, I found the code for AHK Window Info pasted as spoiler at http://www.autohotkey.com/board/topic/8204-ahk-window-info-17/page-6 But it did not help. information found was not more than Ahk Window Spy.

(编辑) 微软的UISpy为我提供了更多信息,但无法在Spotify客户端中获取文本.而且,我意识到在安全性方面是一件好事(否则恶意软件可以读取我的电子邮件密码等).因此,除非Spotify客户想要公开此信息,否则ahk很难或不可能做到这一点.在这种特殊情况下,这是正确的方法还是其他方法?

(edit) UISpy from microsoft gives me a bit more info but it's not possible to get texts in Spotify client. And, I realized that it's a good thing in terms of security (otherwise malware can read my email password etc). So, unless Spotify client wants to expose this information, it would be hard or not possible to do this by ahk. Is this correct or any cleaver way around in this particular case?

推荐答案

不再需要此解决方案.歌曲艺术家和标题已添加回窗口标题"中.

最好的解决方案是将Spotify从 FileHorse 降级到0.9版本.然后执行以下操作:

The best solution is to downgrade Spotify to a 0.9 version from FileHorse. Then do the following:

  1. 转到C:\Users\YOURUSERNAME\Appdata\Roaming\Spotify
  2. 制作一个新的empy文本文件
  3. 将其命名为Spotify_new.exe
  4. 右键单击该文件并将其设置为只读
  5. 复制此文件并命名为新的Spotify_new.exe.sig
  6. Spotify需要删除这些文件才能进行自动升级.这两个文件上的只读标志都将阻止升级.
  1. Go to C:\Users\YOURUSERNAME\Appdata\Roaming\Spotify
  2. Make a new empy text file
  3. Name it Spotify_new.exe
  4. Right click the file and make the file read-only
  5. Copy this file and name the new one Spotify_new.exe.sig
  6. Spotify needs to delete these files to do an automatic upgrade. The read-only flag on both of these files will prevent upgrading from happening.

目前在运行旧版本时没有任何问题.

I haven't had any issues running an old version at this point in time.

这篇关于2015年3月更新后,从Spotify应用获取当前曲目信息的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆