Netflix and Spotify (Both Metro Apps) Controlled with simple voice commands (Alexa and Google) with parameters
-
Hi I saw that there weren't many solutions for those thus I'm sharing what I have done:
-
Netflix - You need the metro app from the windows store
A) Create the following AutoHotkey Script:;Start Netflix with params #SingleInstance Force AutoTrim , off search := "" Loop , %0% ; For each parameter: { search .= %A_Index% A_Space } Run , netflix: WinActivate, Netflix If (search = "" or search = "on " or search = "off ") { ExitApp Return } Sleep, 3000 CoordMode , Mouse, Screen x := 1778 y := 89 Click , %x% %Y% Sleep , 1000 Send , %search% Sleep , 500 CoordMode , Mouse, Screen x := 200 y := 300 Click , %x% %Y% Sleep , 500 CoordMode , Mouse, Screen x := 960 y := 280 Click , %x% %Y% Sleep , 5000 CoordMode , Mouse, Screen x := 1778 y := 975 Click , %x% %Y% ExitApp
Create the following TriggerCMD Command:
C) Create the following IFTTT automation:
-
Spotify - You need the metro app from the windows store
A) Create the following AutoHotkey Script:;Start Spotify with params #SingleInstance Force AutoTrim, off search := "" loop, %0% ; For each parameter: { search .= %A_Index% A_Space } Run, spotify: WinActivate, Spotify Premium If (search = "" or search = "on " or search = "off ") { ExitApp Return } Sleep, 1000 CoordMode, Mouse, Screen x := 45 y := 135 Click, %x% %Y% Sleep, 500 Send, ^a Send, {Delete} Send, %search% Sleep, 500 CoordMode, Mouse, Screen x := 785 y := 385 Click, %x% %Y% ExitApp
Create the following TriggerCMD Command:
C) Create the following IFTTT automation:
With those you can do the following:
- Say "Stream {Whatever search even with multiple words} on {Netlifx/Spotify}" and it will start the corresponding app focus it search for whatever you said and play it (And also fullscreen it for Netflix) (Both tested with multiple voice commands and working fine)
- Use the Devices TriggerCMD creates and start the apps with them or say "Stream on {Netlifx/Spotify}" (Voice command not tested yet but the devices triggers work) without parameters and it will just open the corresponding app focus it and stop the script.
I'm using Google Home but the process should be the same.
Also the assumption is that your resolution is 1920x1080. If not: You'll need to adjust the values for x and y mouse positions for where to click on the respective apps.I hope that this will come in handy.
To the author of TriggerCMD: You have created a great software!!! Good job mate, I'm just waiting for my paycheck (Don't ask ... spending money like a maniac on smart accessories and bushcraft items....) and subscribing to TriggerCMD at the end of the month!
Have a great day!
-