Hi, I’m trying to write a script that lets me select a sound file from 3 or 4 possible folders. Instead of having 3 or 4 “choose from list” commands, is there a way to stick them all in one “choose from list” command?
tell application "Finder" to set allSounds to name of every file in {mainSounds, userSounds}
set theSound to (choose from list allSounds with title "Sounds" with prompt "Select a sound file" OK button name "Select" without empty selection allowed)
Thanks.
Model: 24" iMac 2.4 GHz (late 2007)
Browser: Safari 523.15
Operating System: Mac OS X (10.5)
set mainSounds to {1, 2, 3}
set userSounds to {4, 5, 6}
set x to mainSounds & userSounds
set theSound to (choose from list x with title "Sounds" with prompt "Select a sound file" OK button name "Select" without empty selection allowed)