Hola, estoy tratando de ejecutar un applescript que iniciará el reproductor multimedia VLC y reproducirá todos los archivos en una carpeta cada vez que se agregue un nuevo archivo. Parecía funcionar bien inicialmente, luego reinicié mi computadora y no funciona. Estoy ejecutando el script como una acción de carpeta. por favor vea el guión adjunto. ¿Qué me estoy perdiendo?
on adding folder items to theAttachedFolder after receiving theNewItems
-- Get the name of the attached folder
-- Get List of files in folder
set the_files to get every file of theAttachedFolder
-- open vlc using files in folder which should result in a vlc playlist
of all files in folder
tell application "Finder" to open {the_files} using application
file "VLC.app"
end adding folder items to
Cualquier ayuda será muy apreciada, soy bastante nuevo en esto. Gracias.
on adding folder items to this_folder after receiving these_items
tell application "VLC"
set thePlaylist to "file:///Users/Smokestack/Desktop/For Vlc" -- substitute with your own actual folder path to the folder action folder following the format “file:///“
OpenURL thePlaylist
end tell
end adding folder items to
Debería poder simplemente:
tell application "VLC" to play {the_files}