우리 모두 iTunes의 Doug의 applescript를 알고 있습니다. 그러나 스트리밍 음악의 성장으로 더 이상 iTunes를 사용하지 않고 Spotify를 사용합니다.Spotify의 노래 미리보기 Applescript - NeedleDrop from Doug
나는 노래를 미리보기 위해 NeedleDrop 스크립트를 적용하려고했습니다. 스크립트는 설정할 수 있습니다
a - 주어진 시간부터 시작, f.e. 30 초에 곡 재생 시작 b - 지정된 시간 동안 해당 곡 재생, f.e. 10 초.
스크립트가 주어진 시간에 첫 번째 노래를 시작하고 주어진 시간 동안 재생되지만 다음 노래는 주어진 시간 동안 재생되지만 주어진 시간 값 대신 처음부터 시작하는 것이 문제입니다.
이 스크립트는 Doug의 GNU 라이센스하에 있으며 라이센스가 포함되어 있습니다. 스크립트와 내 보낸 앱을 게시하고 있습니다. 누구나 아이디어가 있다면?!
LINK : Download 여기
이 다운로드 파일에서 제공하는 스크립트입니다
-- handler to get a number from user
to get_a_number(pmpt, addenda, defnum)
set rez to (display dialog addenda & pmpt default answer defnum buttons {"Cancel ", "OK"} default button 2 with title "Needle Drop")
if button returned of rez starts with "cancel" then tell me to quit
set myNumber to text returned of rez
try
if myNumber is "" then get_a_number(pmpt, "Enter only numbers..." & return & return, defnum)
return (myNumber as integer)
on error -- m number n
get_a_number(pmpt, "Enter only numbers..." & return & return, defnum)
end try
end get_a_number
global start_time -- seconds into each track to begin playing
global needle_drop_interval -- seconds to play each track
on run
-- get number of seconds between songs
set needle_drop_interval to my get_a_number("Play each track for how many seconds?", "", "10")
-- get seconds into each track to play
set start_time to my get_a_number("How many seconds into each track to start playing?", "", "10")
-- play first song in the playlist
tell application "Spotify"
activate
set player position to start_time
play
delay needle_drop_interval
end tell
end run
on idle
tell application "Spotify"
if player state is not playing then tell me to quit
pause
next track
set player position to start_time
play
end tell
return needle_drop_interval
end idle
on quit
try
tell application "Spotify" to stop
end try
continue quit
error number -128
end quit
죄송합니다. 저는 Stack에 상당히 익숙합니다. 답변을 투표 할 수 없습니다. 주요 질문에 답했다. 감사 & 환호 – Bodysoulspirit
나는 내 웹 사이트에 작은 응용 프로그램을 배포하고 도움을 주셔서 감사합니다. 나는 그것을 제거하거나 원하는 경우 다른 링크로 변경할 수 있습니다. 환호 -> http://bodysoulspirit.weebly.com/prefy.html – Bodysoulspirit
내 아침을 멋지게 만들었습니다! :디 – Rusty