Folgen Sie dem Video unten, um zu sehen, wie Sie unsere Website als Icon auf Ihrem Homescreen erstellen.
Anmerkung: This feature may not be available in some browsers.
property albumPlaylist : "Aktuelles Album"
tell application "iTunes"
activate
-- manage playlist
if not (exists playlist albumPlaylist) then
set this_playlist to make new playlist
set the name of this_playlist to albumPlaylist
end if
delete every track of playlist albumPlaylist
-- get current track
set cur_album to album of current track
set cur_track_nr to track number of current track
if ((count cur_album) is 0) then my showError("This track has no album!")
-- get track numbers of current album
set trackNumbers to track number of tracks of library playlist 1 whose album is cur_album
-- copy all tracks of this album beginning with the current track to new playlist
repeat with trackNumber in trackNumbers
if trackNumber ? cur_track_nr then
duplicate (first track of library playlist 1 whose album is cur_album and track number is trackNumber) to playlist albumPlaylist
end if
end repeat
-- get player position
set player_position to player position
-- activate playlist
set view of browser window 1 to playlist albumPlaylist
play first track of playlist albumPlaylist
end tell
on showError(msg)
tell application (path to frontmost application as Unicode text)
display dialog msg buttons "Cancel" default button 1 with icon stop
end tell
error number -128
end showError
Okay - kennst du die Funktion "Position merken"? Alle Titel in der Bibliothek markieren, mit Apfel+I Infofenster aufrufen und unten links für alle Titel "Position merken" auf "Ja" stellen - bestätigen. Danach beginnt jedes Stück immer von der Position, wo es irgendwann gestoppt wurde. Das müsste ja dann mit deinem Script auch funktionieren.muetze schrieb:...und das Abspielen das aktuellen Titels nicht von vorn, sondern von seiner vorherigen Position fortsetzen.
property albumPlaylist : "Aktuelles Album"
tell application "iTunes"
activate
-- manage playlist
if not (exists playlist albumPlaylist) then
set this_playlist to make new playlist
set the name of this_playlist to albumPlaylist
end if
delete every track of playlist albumPlaylist
-- get current track
set cur_album to album of current track
set cur_track_nr to track number of current track
if ((count cur_album) is 0) then my showError("This track has no album!")
-- get track numbers of current album
set trackNumbers to track number of tracks of library playlist 1 whose album is cur_album
-- copy all tracks of this album beginning with the current track to new playlist
repeat with trackNumber in trackNumbers
if trackNumber ? cur_track_nr then
duplicate (first track of library playlist 1 whose album is cur_album and track number is trackNumber) to playlist albumPlaylist
end if
end repeat
-- get player position
set bookmarkable of current track to true
-- activate playlist
set view of browser window 1 to playlist albumPlaylist
play first track of playlist albumPlaylist
set bookmarkable of current track to false
end tell
on showError(msg)
tell application (path to frontmost application as Unicode text)
display dialog msg buttons "Cancel" default button 1 with icon stop
end tell
error number -128
end showError