Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

Click here to return to the '10.6: Another way to view any text file in Quick Look' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
10.6: Another way to view any text file in Quick Look
Authored by: mr. applescript on Jan 14, '10 10:35:01PM
A couple things: 1) inside the Run handler: use "as alias list" to have the Finder return references to the currently selected items as a list of references in alias format 2) in the Open handler: you don't need to coerce the input to an alias list, they already are by default 3) in the sub-routine: you have to create a space-delimited string of posix references by iterating the list of alias references, like this:
on showthefiles(theitems)
	repeat with i from 1 to the count of theitems
		set this_path to the quoted form of the POSIX path of (item i of theitems)
		if i is 1 then
			set the POSIX_list to this_path
			set the POSIX_list to the POSIX_list & space & this_path
		end if
	end repeat
	set thescript to ("qlmanage -p -c public.plain-text " & POSIX_list)
	do shell script thescript
end showthefiles

[ Reply to This | # ]