From 008c89f585b8b967da17441c23fa69b593696fae Mon Sep 17 00:00:00 2001 From: Jason Rudolph Date: Sun, 19 Mar 2017 14:46:11 -0400 Subject: [PATCH] Add beginnings of "previous song" action MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit For some reason, this action doesn't work. When you trigger the action in LaunchBar, you can *see* it clicking the "previous song" button in the Sonos UI, but Sonos doesn't actually go to the previous song. 🤷‍♂️ xref: b55155527023788cebb642c7b8f126d1c6273e89 --- .../Contents/Info.plist | 39 ++++++++++++++++++ .../Contents/Resources}/previous-song.png | Bin .../Contents/Scripts/default.scpt | 5 +++ 3 files changed, 44 insertions(+) create mode 100644 sonos-previous-song.lbaction/Contents/Info.plist rename {icons => sonos-previous-song.lbaction/Contents/Resources}/previous-song.png (100%) create mode 100644 sonos-previous-song.lbaction/Contents/Scripts/default.scpt diff --git a/sonos-previous-song.lbaction/Contents/Info.plist b/sonos-previous-song.lbaction/Contents/Info.plist new file mode 100644 index 0000000..3bc3901 --- /dev/null +++ b/sonos-previous-song.lbaction/Contents/Info.plist @@ -0,0 +1,39 @@ + + + + + CFBundleIconFile + previous-song.png + CFBundleIdentifier + com.jasonrudolph.LaunchBar.action.SonosPreviousSong + CFBundleName + Sonos - Previous Song + CFBundleVersion + 1.0 + LBDescription + + LBAuthor + Jason Rudolph + LBRequirements + Sonos Controller for Mac v7.1 + LBSummary + Go back to the previous song in the macOS Sonos app + LBTwitter + @jasonrudolph + LBWebsiteURL + http://jasonrudolph.com + + LBRequiredApplication + com.sonos.macController + LBRequirements + Sonos Controller for Mac v7.1 + LBScripts + + LBDefaultScript + + LBScriptName + default.scpt + + + + diff --git a/icons/previous-song.png b/sonos-previous-song.lbaction/Contents/Resources/previous-song.png similarity index 100% rename from icons/previous-song.png rename to sonos-previous-song.lbaction/Contents/Resources/previous-song.png diff --git a/sonos-previous-song.lbaction/Contents/Scripts/default.scpt b/sonos-previous-song.lbaction/Contents/Scripts/default.scpt new file mode 100644 index 0000000..41a63e0 --- /dev/null +++ b/sonos-previous-song.lbaction/Contents/Scripts/default.scpt @@ -0,0 +1,5 @@ +tell application "System Events" + tell process "Sonos" + click button 2 of window 1 + end tell +end tell