Hi,
i never got a tiny idea working: to listen songs inside a folder, but without iTunes. Like a Burn folder, but listening music instead
I tried with “Play Sound.app” to hear the music from within folders, but its vocabulary seems broken. Somebody knows alternatives ?
# set get_sound to quoted form of (POSIX path of ((path to me as string) & "Contents:Resources:Glass.aiff" as alias))
#do shell script ("afplay " & get_sound )
#=====================================
tell application "Finder" to set mbox to (folder of front window as text)
--set mbox to choose folder default location alias frfl with prompt "Suche Ordner, der Musk enthält"
set ls to {"Listen briefly", "Choose Song", "Continue", "Stop"}
set ch to choose from list ls with prompt "MUSIKBOX Optionen..." default items (item 1 of ls)
if ch is false then return
set ch to ch as text
set lf to list folder mbox without invisibles
if ch is "Stop" then
tell application "Play Sound.app" to «event µSNDstop»
else if ch is "Choose Song" then
try
set my_titles to (choose from list lf with prompt ch with multiple selections allowed)
on error
return
end try
set ky to false
repeat with a in my_titles
set play_it to (mbox & a as text)
my playmusic(play_it, ky)
end repeat
else
set ky to false
if ch is "Listen briefly" then set ky to true
repeat with a in lf
set play_it to (mbox & a as text)
my playmusic(play_it, ky)
end repeat
end if
on playmusic(play_it, ky)
tell application "Play Sound.app" to tell alias play_it
try
if ky is true then
«event µSNDplay» given «class pos2»:30
--do shell script "sleep 32"
else
«event µSNDplay»
end if
on error
--no valid sound file found
return
end try
end tell
end playmusic