Quicklook from a Script

I haven’t tested this thoroughly, so I don’t know what happens if there’s an error, but I’ve been using this to sort out some scripts from a script:

set Fldr to choose folder with prompt "Choose a folder whose files you want to glance at" & return & return & "You must close the Quicklook window to see the next file in the folder"
tell application "Finder" to set F to files of Fldr as alias list
repeat with k from 1 to count F
	do shell script "qlmanage -p " & quoted form of POSIX path of item k of F
end repeat

simple but nice, good job Adam, dn’t have time to test it thoroughly im afraid though :frowning:

Just a little note:

As QuickLook requires Leopard, the try block isn’t needed anymore, because the alias list bug is fixed in 10.5

Thanks, Stefan. I’ll remember that bug is history in my own scripts, but include it when I don’t know what the user is running. :slight_smile: In this combination, you’re absolutely right – no Leopard, no Quicklook, so I’ve removed it from the original