Spotify-音量-AppleScript API

Spotify-音量-AppleScript API,applescript,spotify,spotify-app,spotify-desktop,Applescript,Spotify,Spotify App,Spotify Desktop,我尝试了很多很多场景来制作一个脚本,但是没有成功。例如: tell application "System Events" set MyList to (name of every process) end tell if (MyList contains "Spotify") is true then tell application "Spotify" set volcheck to get sound volume set volcheck

我尝试了很多很多场景来制作一个脚本,但是没有成功。例如:

tell application "System Events"
    set MyList to (name of every process)
end tell
if (MyList contains "Spotify") is true then

    tell application "Spotify"
        set volcheck to get sound volume
        set volcheck to (volcheck + 10)
        set sound volume to volcheck    
    end tell

end if
或:

为了调试,我在不同的步骤后使用了命令“说音量”,我发现这个值与他第一次得到的值相同。它将“重置”的唯一方法是按暂停/播放。每次我暂停/播放“音量”时,都会得到新的值,并且修改操作会进行一次,直到我再次暂停/播放为止

在这里我请求帮助:

他们说我应该向spotify报告。在spotify上,我正在寻找我应该在哪里报告这一点,它说没有开发人员可以在这里发布。我来了

所以我的问题是:

我是一个很好的人,在哪里谈论这个虫子


有人有解决方案吗?

看起来您在其他地方问过这个问题,可能已经找到了答案:Spotify的某些版本打破了这一点,但您所拥有的基本上是正确的

我在下面对其进行了扩展,因为(至少在v1.0.20.94.g8f8543b3中)如果将其设置为大于100的值,卷将换行为0。同样,如果您尝试将其设置为0以下,它将环绕到100

tell application "Spotify"
    set currentvol to get sound volume
    -- volume wraps at 100 to 0
    if currentvol > 90 then
        set sound volume to 100
    else
        set sound volume to currentvol + 10
    end if
end tell

我也需要相反的东西。很明显,但你看:)

告诉应用程序“Spotify”
设置currentvol以获取音量
--卷在100到0之间换行
如果currentvol<10,则
将音量设置为0
其他的
将音量设置为当前音量-10
如果结束
结束语
结束alfred_脚本
(我正在制作)

tell application "Spotify"
    set currentvol to get sound volume
    -- volume wraps at 100 to 0
    if currentvol > 90 then
        set sound volume to 100
    else
        set sound volume to currentvol + 10
    end if
end tell
tell application "Spotify"
    set currentvol to get sound volume
    -- volume wraps at 100 to 0
    if currentvol < 10 then
        set sound volume to 0
    else
        set sound volume to currentvol - 10
    end if
end tell

end alfred_script