I’m wondering if it is possible to control the current selection of the overview in iTunes.
I’d like to select the album of the currently played back track.
Does anyone know if this can be accomplished with applescript?
Thanks!
-pulse00
I’m wondering if it is possible to control the current selection of the overview in iTunes.
I’d like to select the album of the currently played back track.
Does anyone know if this can be accomplished with applescript?
Thanks!
-pulse00
I’m not understanding your question. Could you rephrase it or give an example of what you want to do?
cheers
Sorry… i’ll try to be more specific:
Most of the time i’m listening to random tracks of my library playlist (all songs i have).
I’d like to be able to stop playing random tracks from the whole library, and only play the album of the current track.
To do so, i have to search the Album in the “Overview window” (dunno if this is the right translation for it, my system language is german) and then select it.
If the itunes browser shows the library playlist, there’s an icon with an eye in the top right corner of the app, which lets you hide and unhide what i translated as “overview”.
I don’t want to search the album manually each time, therefore i’m trying to write an applescript which does that automatically.
I hope i described the issue clearer…
Thanks!
Thanks, that works too!
I tried to edit the script that it plays the current track until the end, and then switches to some random track in the Temp-playlist.
Here’s my attempt, it doesn’t work for some reason:
tell application "iTunes"
set This_string to album of the current track
set This_track to database ID of current track
if This_string is not "" then
if not (exists playlist "Temp") then make new playlist with properties {name:"Temp", shuffle:false}
delete tracks of playlist "Temp"
duplicate (tracks of library playlist 1 whose album is This_string) to playlist "Temp"
repeat with i from player position to finish of current track
if player position is greater than ((finish of current track) - 5) then
play some track of playlist "Temp"
exit repeat
end if
end repeat
set view of browser window 1 to playlist "Temp"
else
beep 2
end if
end tell
Could someone tell me what’s wrong in the script?
Thanks!
nice, thanks!
mhmmm, unfortunately, the script freezes iTunes on my powerbook…
anyone else tried it?
-pulse00
Cool, Solution 2 works fine, thanks alot!