2013-11-13, 15:27
  #1
Medlem
Hej! Kör mycket radio och dylikt på Spotify.
Jag vill inte höra några nNckelbacklåtar, så jag gjorde ett script som byter till nästa låt om Nickelback skulle börja spelas.

Ladda ner appen här:
http://www.4shared.com/file/r1WEs2wN...ipper_v11.html

Så här ser AppleScriptet ut
Kod:
on idle
	tell application "Spotify"
		set theTrack to current track
		set theArtist to artist of theTrack
		if player state is playing then
			if theArtist is "Nickelback" then
				-- comment
				tell application "System Events"
					set MyList to (name of every process)
				end tell
				if (MyList contains "Spotify") is true then
					tell application "Spotify" to next track
				end if
				-- comment
			end if
		end if
	end tell
	return 1
end idle
__________________
Senast redigerad av Senkapi 2013-11-13 kl. 15:40. Anledning: Lag till return 1, för att den ska skippa snabbare samt uppdaterade länken.
Citera
2013-11-13, 15:33
  #2
Medlem
maltzors avatar
Citat:
Ursprungligen postat av Senkapi
Hej! Kör mycket radio och dylikt på Spotify.
Jag vill inte höra några nNckelbacklåtar, så jag gjorde ett script som byter till nästa låt om Nickelback skulle börja spelas.

Ladda ner appen här:
http://www.4shared.com/file/Zm4uxBK4...y_skipper.html

Så här ser AppleScriptet ut
Kod:
on idle
	tell application "Spotify"
		set theTrack to current track
		set theArtist to artist of theTrack
		if player state is playing then
			if theArtist is "Nickelback" then
				-- comment
				tell application "System Events"
					set MyList to (name of every process)
				end tell
				if (MyList contains "Spotify") is true then
					tell application "Spotify" to next track
				end if
				-- comment
			end if
		end if
	end tell
end idle

Snyggt!
Citera

Skapa ett konto eller logga in för att kommentera

Du måste vara medlem för att kunna kommentera

Skapa ett konto

Det är enkelt att registrera ett nytt konto

Bli medlem

Logga in

Har du redan ett konto? Logga in här

Logga in