yeah some googling found it already, tnx for the quick response.
Im very noobish at this all and most of it is just copy past and reading.
What i want is the following, tru smartthings with a virtual button to start a playlist but also to stop the playlist if the virtual sensor switch to off.
Ive made it so far that i can start a playlist and send the audio tru a spotify connect speaker as so
Set WshShell = WScript.CreateObject("WScript.Shell")
Comandline = "C:\Users\Peke\AppData\Roaming\Spotify\Spotify.exe"
WScript.sleep 9000
CreateObject("WScript.Shell").Run("spotify:user:1131846872:playlist:3ztoPH7GPeH9b898dIXcvc")
WScript.sleep 5000
WshShell.SendKeys "^{s}"
WScript.sleep 1000
WshShell.SendKeys "^{RIGHT}"
WScript.sleep 1000
WshShell.SendKeys "^{d}"
WScript.sleep 1000
WshShell.SendKeys "{TAB 4}", True
WScript.sleep 1000
WshShell.SendKeys "+{ENTER}"
but what i really also want if the virtual button goes to off that the playlist stops and the sound out of my spotify connect speaker stops playing.
Is this possible, if so can you point me in the right direction?
Greetz Peke