Page 1 of 1

quicklook movies automatically

PostPosted: Mon Apr 07, 2008 12:47 pm
by Tux234
I wrote a quick (hehe pun intended) applescript to automatically quicklook movies, or anything else that you want. How is this useful? Well I use it to automatically quicklook movies from the internet once they are finished downloading. It can be used for anything that can be quicklooked (including the plugins). Enjoy!
Code: Select all
on hazelProcessFile(infile)
   set thePath to quoted form of POSIX path of infile
   do shell script "qlmanage -p " & thePath & " >& /dev/null"
   
end hazelProcessFile

Re: quicklook movies automatically

PostPosted: Tue Apr 08, 2008 2:01 pm
by Mr_Noodle
Cool. Thanks for posting this. I've noticed articles on doing this (using non-Hazel mechanisms) lately.

Since you are executing a shell script, you can bypass AppleScript and have Hazel run a shell script directly. I'm just typing this in cold so I haven't tested it but it would probably look like this:
Code: Select all
#!/bin/sh

qlmanage -p $1 >& /dev/null

The $1 is the first argument passed in by Hazel, which is the path to the file.