quicklook movies automatically

From your noodle to other noodles. Talk about ways to get the most from Hazel. Even exchange recipes for the cool rules you've thought up. DO NOT POST YOUR QUESTIONS HERE.

Moderators: Mr_Noodle, Moderators

quicklook movies automatically 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
Tux234
 
Posts: 3
Joined: Wed Oct 11, 2006 5:52 pm

Re: quicklook movies automatically 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.
Mr_Noodle
Site Admin
 
Posts: 11195
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City


Return to Tips & Tricks - DO NOT POST QUESTIONS