Here is some simple code examples that you can use to do simple tasks like start and stop a playlist in spotify. I will upload some more advanced scripts like creating a cue list with multiple tracks and start them using timecodes when i have the time.
When dealing with tracks and playlists in Spotify you need to use the URI code whenever you want to send a command to the application. You can find the URI by right clicking on the options and then under the share tab you find "Copy spotify URI"